mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-11-10 06:24:33 +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 reporter = watch ? buildReporterPlugin() : undefined
|
||||||
const viteConfig = mergeConfig(config, {
|
const viteConfig = mergeConfig(config, {
|
||||||
build: {
|
build: {
|
||||||
rollupOptions: { input },
|
|
||||||
write: false,
|
write: false,
|
||||||
watch: false
|
watch: false
|
||||||
},
|
},
|
||||||
@ -106,7 +105,15 @@ async function bundleEntryFile(
|
|||||||
],
|
],
|
||||||
logLevel: 'warn',
|
logLevel: 'warn',
|
||||||
configFile: false
|
configFile: false
|
||||||
})
|
}) as InlineConfig
|
||||||
|
|
||||||
|
// rewrite the input instead of merging
|
||||||
|
const buildOptions = viteConfig.build!
|
||||||
|
buildOptions.rollupOptions = {
|
||||||
|
...buildOptions.rollupOptions,
|
||||||
|
input
|
||||||
|
}
|
||||||
|
|
||||||
const bundles = await viteBuild(viteConfig)
|
const bundles = await viteBuild(viteConfig)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user