mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-11-09 22:16:01 +08:00
fix(modulePath): rewrite the build input instead of merging
This commit is contained in:
parent
0276407b5b
commit
9152dfc943
@ -88,7 +88,6 @@ async function bundleEntryFile(
|
||||
const reporter = watch ? buildReporterPlugin() : undefined
|
||||
const viteConfig = mergeConfig(config, {
|
||||
build: {
|
||||
rollupOptions: { input },
|
||||
write: false,
|
||||
watch: false
|
||||
},
|
||||
@ -106,7 +105,15 @@ async function bundleEntryFile(
|
||||
],
|
||||
logLevel: 'warn',
|
||||
configFile: false
|
||||
})
|
||||
}) as InlineConfig
|
||||
|
||||
// rewrite the input instead of merging
|
||||
const buildOptions = viteConfig.build!
|
||||
buildOptions.rollupOptions = {
|
||||
...buildOptions.rollupOptions,
|
||||
input
|
||||
}
|
||||
|
||||
const bundles = await viteBuild(viteConfig)
|
||||
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user