fix(vscode): bundle syntax worker imports

This commit is contained in:
Bohdan Triapitsyn
2026-08-24 16:58:45 +03:00
parent c82f188fc8
commit 7bd27d44d6
3 changed files with 20 additions and 0 deletions
+7
View File
@@ -25,6 +25,13 @@ export default defineConfig(({ mode }) => ({
},
worker: {
format: 'es',
// VS Code webviews cannot load module imports from inside a web worker.
// Keep the Shiki worker self-contained instead of emitting grammar chunks.
rollupOptions: {
output: {
inlineDynamicImports: true,
},
},
},
define: {
'process.env.NODE_ENV': JSON.stringify(mode === 'production' ? 'production' : 'development'),