Issue 1:
Bug report

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Other relevant information:

webpack version:

Node.js version:

Operating System:

Additional tools:

{

"name": "mf-demo",

"version": "0.0.0",

"scripts": {

"ng": "ng",

"start": "npm run start:shell",

"start:shell": "ng serve shell -o --port 5000",

"start:mfe1": "ng serve mfe1 -o --port 3000",

"start:all": "concurrently "npm run start:shell" "npm run start:mfe1" ",

"build:shell": "ng build shell --prod",

"build:mfe1": "ng build mfe1 --prod",

"serve:dist": "concurrently "serve dist/shell -l 5000 -s" "serve dist/mfe1 -l 3000 -s" ",

"build": "npm run build:shell && npm run build:mfe1",

"test": "ng test",

"lint": "ng lint",

"e2e": "ng e2e"

},

"private": true,

"resolutions": {

"webpack": "^5.0.0"

},

"dependencies": {

"@angular-architects/module-federation": "^1.2.3",

"@angular/animations": "11.2.4",

"@angular/common": "11.2.4",

"@angular/compiler": "^11.2.4",

"@angular/core": "^11.2.4",

"@angular/forms": "11.2.4",

"@angular/platform-browser": "11.2.4",

"@angular/platform-browser-dynamic": "11.2.4",

"@angular/router": "11.2.4",

"@nrwl/workspace": "^11.4.0",

"concurrently": "^6.0.0",

"rxjs": "^6.6.6",

"tslib": "^2.1.0",

"zone.js": "~0.11.4"

},

"devDependencies": {

"@angular-devkit/build-angular": "^0.1102.3",

"@angular/cli": "11.2.3",

"@angular/compiler-cli": "^11.2.4",

"@types/jasmine": "~3.6.6",

"@types/jasminewd2": "~2.0.8",

"@types/node": "^14.14.33",

"codelyzer": "^6.0.1",

"jasmine-core": "~3.6.0",

"jasmine-spec-reporter": "~6.0.0",

"karma": "~6.1.2",

"karma-chrome-launcher": "~3.1.0",

"karma-coverage": "~2.0.3",

"karma-jasmine": "~4.0.1",

"karma-jasmine-html-reporter": "^1.5.4",

"ngx-build-plus": "^11.0.0",

"protractor": "~7.0.0",

"serve": "^11.3.2",

"ts-node": "~9.1.1",

"tslint": "~6.1.0",

"typescript": "^4.1.5"

}

}

An unhandled exception occurred: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

configuration.output has an unknown property 'uniqueName'. These properties are valid:

object { auxiliaryComment?, chunkCallbackName?, chunkFilename?, chunkLoadTimeout?, crossOriginLoading?, devtoolFallbackModuleFilenameTemplate?, devtoolLineToLine?, devtoolModuleFilenameTemplate?, devtoolNamespace?, filename?, futureEmitAssets?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateFunction?, hotUpdateMainFilename?, jsonpFunction?, jsonpScriptType?, library?, libraryExport?, libraryTarget?, path?, pathinfo?, publicPath?, sourceMapFilename?, sourcePrefix?, strictModuleExceptionHandling?, umdNamedDefine?, webassemblyModuleFilename? }

-> Options affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.

See "C:\Users\Hugo Barboza\AppData\Local\Temp\ng-F3Qn1m\angular-errors.log" for further details.

Issue 2:
Bug report

What is the current behavior?

Under certain circumstances, modules in entrypoint chunks will be bundled into other async chunks.

If the current behavior is a bug, please provide the steps to reproduce.

Here is the reproducible test repo: https://github.com/Mensu/webpack-reproduce-issue-15173

To reproduce the issue, simply run npm install and npm run build. After the build is finished, search for "moduleAB" in the dist folder, and find out module src/moduleAB.js was bundled into chunk dist/entryA.js, chunk dist/entryB.js (entrypoint chunks, which is expected) and chunk dist/commonAsync.js (async chunks, which is unexpected)

Module src/moduleAB.js is statically imported by entrypoint modules src/entryA.js and src/entryB.js, therefore is available in entrypoint chunks dist/entryA.js and dist/entryB.js. Since dist/commonAsync.js is an async chunk, the factory of module src/moduleAB.js must have been available in the entrypoint chunks when we are to load dist/commonAsync.js, therefore it seems unnecessary to duplicately bundle src/moduleAB.js into dist/commonAsync.js.

What is the expected behavior?

Module src/moduleAB.js was only bundled into entrypoint chunks dist/entryA.js and dist/entryB.js, not into dist/commonAsync.js.

I kind of believe the problem lies here availableModules.has(module) || availableModules.plus.has(m)

https://github.com/webpack/webpack/blob/v5.66.0/lib/buildChunkGraph.js#L906-L909

The first condition checks whether availableModules has module, but when it comes to the second condition, it checks whether availableModules.plus has m instead of module, which is inconsistent with the first condition. I'm not sure whether checking against m is intended for some reason I'm missing, or it's just a typo. Changing the condition to availableModules.plus.has(module) may fix this issue, but I don't know whether the change will break other codes or not.

Other relevant information:

webpack version: 5.66.0

Node.js version: 12.10.0

Operating System: Mac OS

Additional tools: N/A