Skip to content

Commit

Permalink
fix: remove node resolve condition for preload (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex8088 committed Jul 7, 2023
1 parent 785b32f commit 0367f73
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/plugins/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 }

Expand Down

0 comments on commit 0367f73

Please sign in to comment.