mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-24 08:06:17 +08:00
feat(@angular-devkit/build-angular): enable webpack profile when using stats-json flag
More information about what `profile` does can be found here: https://webpack.js.org/api/stats Closes #13907
This commit is contained in:
parent
20a644ec4b
commit
f71896874e
@ -280,6 +280,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
|
||||
? 'production'
|
||||
: 'development',
|
||||
devtool: false,
|
||||
profile: buildOptions.statsJson,
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.mjs', '.js'],
|
||||
symlinks: !buildOptions.preserveSymlinks,
|
||||
|
@ -23,4 +23,11 @@ describe('Browser Builder stats json', () => {
|
||||
const { files } = await browserBuild(architect, host, target, { statsJson: true });
|
||||
expect('stats.json' in files).toBe(true);
|
||||
});
|
||||
|
||||
it('works with profile flag', async () => {
|
||||
const { files } = await browserBuild(architect, host, target, { statsJson: true });
|
||||
expect('stats.json' in files).toBe(true);
|
||||
const stats = await files['stats.json'];
|
||||
expect(stats).toMatch(/profile.+building/);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user