chore: remove process env define
This commit is contained in:
parent
72d37a70ca
commit
3b2ba0ae25
|
@ -29,14 +29,6 @@ function findInput(root: string, scope = 'renderer'): string {
|
|||
return ''
|
||||
}
|
||||
|
||||
function processEnvDefine(): Record<string, string> {
|
||||
return {
|
||||
'process.env': `process.env`,
|
||||
'global.process.env': `global.process.env`,
|
||||
'globalThis.process.env': `globalThis.process.env`
|
||||
}
|
||||
}
|
||||
|
||||
export function electronMainVitePlugin(options?: ElectronPluginOptions): Plugin[] {
|
||||
return [
|
||||
{
|
||||
|
@ -83,9 +75,6 @@ export function electronMainVitePlugin(options?: ElectronPluginOptions): Plugin[
|
|||
const buildConfig = mergeConfig(defaultConfig.build, build)
|
||||
config.build = buildConfig
|
||||
|
||||
config.define = config.define || {}
|
||||
config.define = { ...processEnvDefine(), ...config.define }
|
||||
|
||||
config.envPrefix = config.envPrefix || 'MAIN_VITE_'
|
||||
|
||||
config.publicDir = config.publicDir || 'resources'
|
||||
|
@ -185,9 +174,6 @@ export function electronPreloadVitePlugin(options?: ElectronPluginOptions): Plug
|
|||
const buildConfig = mergeConfig(defaultConfig.build, build)
|
||||
config.build = buildConfig
|
||||
|
||||
config.define = config.define || {}
|
||||
config.define = { ...processEnvDefine(), ...config.define }
|
||||
|
||||
config.envPrefix = config.envPrefix || 'PRELOAD_VITE_'
|
||||
|
||||
config.publicDir = config.publicDir || 'resources'
|
||||
|
|
Loading…
Reference in a new issue