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 nodeTarget = getElectronNodeTarget()
|
||||||
|
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
resolve: {
|
|
||||||
browserField: false,
|
|
||||||
mainFields: ['module', 'jsnext:main', 'jsnext'],
|
|
||||||
conditions: ['node']
|
|
||||||
},
|
|
||||||
build: {
|
build: {
|
||||||
outDir: path.resolve(root, 'out', 'preload'),
|
outDir: path.resolve(root, 'out', 'preload'),
|
||||||
target: nodeTarget,
|
target: nodeTarget,
|
||||||
|
@ -197,8 +192,6 @@ export function electronPreloadVitePlugin(options?: ElectronPluginOptions): Plug
|
||||||
const buildConfig = mergeConfig(defaultConfig.build, build)
|
const buildConfig = mergeConfig(defaultConfig.build, build)
|
||||||
config.build = buildConfig
|
config.build = buildConfig
|
||||||
|
|
||||||
config.resolve = mergeConfig(defaultConfig.resolve, config.resolve || {})
|
|
||||||
|
|
||||||
config.define = config.define || {}
|
config.define = config.define || {}
|
||||||
config.define = { ...processEnvDefine(), ...config.define }
|
config.define = { ...processEnvDefine(), ...config.define }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue