build: Wrap bundles using webpack (#25557)
This commit is contained in:
parent
f7945ade07
commit
56d1fafe66
9 changed files with 169 additions and 178 deletions
|
@ -46,9 +46,12 @@ const main = async () => {
|
|||
const webpackTargetsWithDeps = await Promise.all(webpackTargets.map(async webpackTarget => {
|
||||
const tmpDir = await fs.mkdtemp(path.resolve(os.tmpdir(), 'electron-filenames-'));
|
||||
const child = cp.spawn('node', [
|
||||
'build/webpack/get-outputs.js',
|
||||
`./${webpackTarget.config}`,
|
||||
path.resolve(tmpDir, `${webpackTarget.name}.measure.js`)
|
||||
'./node_modules/webpack-cli/bin/cli.js',
|
||||
'--config', `./build/webpack/${webpackTarget.config}`,
|
||||
'--display', 'errors-only',
|
||||
`--output-path=${tmpDir}`,
|
||||
`--output-filename=${webpackTarget.name}.measure.js`,
|
||||
'--env.PRINT_WEBPACK_GRAPH'
|
||||
], {
|
||||
cwd: path.resolve(__dirname, '..')
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue