fix: remove node resolve condition for preload (#204)
This commit is contained in:
parent
785b32f2b0
commit
0367f73a95
|
@ -158,11 +158,6 @@ export function electronPreloadVitePlugin(options?: ElectronPluginOptions): Plug
|
|||
const nodeTarget = getElectronNodeTarget()
|
||||
|
||||
const defaultConfig = {
|
||||
resolve: {
|
||||
browserField: false,
|
||||
mainFields: ['module', 'jsnext:main', 'jsnext'],
|
||||
conditions: ['node']
|
||||
},
|
||||
build: {
|
||||
outDir: path.resolve(root, 'out', 'preload'),
|
||||
target: nodeTarget,
|
||||
|
@ -197,8 +192,6 @@ export function electronPreloadVitePlugin(options?: ElectronPluginOptions): Plug
|
|||
const buildConfig = mergeConfig(defaultConfig.build, build)
|
||||
config.build = buildConfig
|
||||
|
||||
config.resolve = mergeConfig(defaultConfig.resolve, config.resolve || {})
|
||||
|
||||
config.define = config.define || {}
|
||||
config.define = { ...processEnvDefine(), ...config.define }
|
||||
|
||||
|
|
Loading…
Reference in a new issue