fix: pre-bundle xterm packages to resolve MIME type error in terminal
Vite's dev server was returning HTML error pages instead of JS for dynamically imported @xterm/* modules, causing 'text/html is not a valid JavaScript MIME type' failures during terminal initialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,14 @@ export default defineConfig({
|
||||
"@fusion/core": resolve(__dirname, "../core/src/types.ts"),
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
"@xterm/xterm",
|
||||
"@xterm/addon-fit",
|
||||
"@xterm/addon-web-links",
|
||||
"@xterm/addon-webgl",
|
||||
],
|
||||
},
|
||||
build: {
|
||||
outDir: "../dist/client",
|
||||
emptyOutDir: true,
|
||||
|
||||
Reference in New Issue
Block a user