File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,12 +280,6 @@ export default function electron(options: ElectronOptions | ElectronOptions[]):
280280 }
281281 } ,
282282 async closeBundle ( ) {
283- // Remove mock files created in configResolved before building Electron.
284- if ( cleanupMock ) {
285- await cleanupMock ( )
286- cleanupMock = undefined
287- }
288-
289283 for ( const options of optionsArray ) {
290284 options . vite ??= { }
291285 options . vite . mode ??= configEnv . mode
@@ -294,6 +288,12 @@ export default function electron(options: ElectronOptions | ElectronOptions[]):
294288 options . vite . envPrefix ??= userConfig . envPrefix
295289 await build ( options )
296290 }
291+
292+ // Remove mock files created in configResolved before building Electron.
293+ if ( cleanupMock ) {
294+ await cleanupMock ( )
295+ cleanupMock = undefined
296+ }
297297 } ,
298298 } ,
299299 ]
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { builtinModules } from 'node:module'
33import type { InlineConfig } from 'vite'
44import { describe , expect , it } from 'vitest'
55
6- import { withExternalBuiltins } from '..'
6+ import { withExternalBuiltins } from '../src/index '
77import type { RolldownOptions } from '../src/utils'
88
99type ExternalOption = RolldownOptions [ 'external' ]
You can’t perform that action at this time.
0 commit comments