You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to build two browserWindows and every browserWindows has a App.vue file and main.ts but when i try to change vite.config.ts
such like:
vite: {
build: {
outDir: 'dist/main',
rollupOptions: {
input: {
index: path.resolve(__dirname, 'src/renderer/index.html'),
translator: path.resolve(__dirname, 'src/translator/translator.html')
},
plugins: [
require('@rollup/plugin-alias')({
entries: [{ find: '@', replacement: resolve(__dirname, 'src') }]
})
],
external: ['electron', ...builtinModules, 'koffi']
}
},
}
it happen error:[vite:build-import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
file: D:/work/ChatDesk/YuKigal/src/translator/App.vue:3:35
1:
2:
3:
^
4:
5:
error during build:
RollupError: Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
at error (file:///D:/work/ChatDesk/YuKigal/node_modules/rollup/dist/es/shared/parseAst.js:337:30)
at Object.error (file:///D:/work/ChatDesk/YuKigal/node_modules/rollup/dist/es/shared/node-entry.js:18485:20)
at Object.error (file:///D:/work/ChatDesk/YuKigal/node_modules/rollup/dist/es/shared/node-entry.js:17594:42)
at Object.transform (file:///D:/work/ChatDesk/YuKigal/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:66399:22)
i remove it it ok,it in the develpoment but in production i need two html file its not one,what should i do
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i want to build two browserWindows and every browserWindows has a App.vue file and main.ts but when i try to change vite.config.ts
such like:
vite: {
build: {
outDir: 'dist/main',
rollupOptions: {
input: {
index: path.resolve(__dirname, 'src/renderer/index.html'),
translator: path.resolve(__dirname, 'src/translator/translator.html')
},
plugins: [
require('@rollup/plugin-alias')({
entries: [{ find: '@', replacement: resolve(__dirname, 'src') }]
})
],
external: ['electron', ...builtinModules, 'koffi']
}
},
}
it happen error:[vite:build-import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
file: D:/work/ChatDesk/YuKigal/src/translator/App.vue:3:35
1:
2:
3:
^
4:
5:
error during build:
RollupError: Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.
at error (file:///D:/work/ChatDesk/YuKigal/node_modules/rollup/dist/es/shared/parseAst.js:337:30)
at Object.error (file:///D:/work/ChatDesk/YuKigal/node_modules/rollup/dist/es/shared/node-entry.js:18485:20)
at Object.error (file:///D:/work/ChatDesk/YuKigal/node_modules/rollup/dist/es/shared/node-entry.js:17594:42)
at Object.transform (file:///D:/work/ChatDesk/YuKigal/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:66399:22)
i remove it it ok,it in the develpoment but in production i need two html file its not one,what should i do
Beta Was this translation helpful? Give feedback.
All reactions