Skip to content

Commit 118ffb1

Browse files
committed
test(@ngtools/webpack): update webpack test-app E2E to use Webpack 5
The direct Webpack test for the Webpack plugin is now updated to use Webpack 5 as Webpack 5 is now the default for the Angular tooling.
1 parent 79f369c commit 118ffb1

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

tests/legacy-cli/e2e/assets/webpack/test-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"devDependencies": {
1919
"raw-loader": "^4.0.2",
2020
"sass": "^1.32.8",
21-
"sass-loader": "^10.1.1",
21+
"sass-loader": "^11.0.1",
2222
"typescript": "~4.2.3",
23-
"webpack": "^4.46.0",
23+
"webpack": "^5.27.0",
2424
"webpack-cli": "^4.5.0"
2525
}
2626
}

tests/legacy-cli/e2e/tests/packages/webpack/test-app.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ import { createProjectFromAsset } from '../../../utils/assets';
33
import { expectFileSizeToBeUnder, expectFileToMatch, replaceInFile } from '../../../utils/fs';
44
import { exec } from '../../../utils/process';
55

6-
76
export default async function (skipCleaning: () => void) {
87
const webpackCLIBin = normalize('node_modules/.bin/webpack-cli');
98

109
await createProjectFromAsset('webpack/test-app');
10+
1111
await exec(webpackCLIBin);
1212

1313
// Note: these sizes are without Build Optimizer or any advanced optimizations in the CLI.
14-
await expectFileSizeToBeUnder('dist/app.main.js', 565 * 1024);
15-
await expectFileSizeToBeUnder('dist/1.app.main.js', 1 * 1024);
16-
await expectFileSizeToBeUnder('dist/2.app.main.js', 2 * 1024);
14+
await expectFileSizeToBeUnder('dist/app.main.js', 656 * 1024);
15+
await expectFileSizeToBeUnder('dist/501.app.main.js', 1 * 1024);
16+
await expectFileSizeToBeUnder('dist/888.app.main.js', 2 * 1024);
17+
await expectFileSizeToBeUnder('dist/972.app.main.js', 2 * 1024);
1718

1819

1920
// test resource urls without ./

0 commit comments

Comments
 (0)