-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Experimental Webpack 5 Support #841
Comments
Hey @xiaoxiangmoe, |
@just-jeb |
@ydmitry Awesome stuff! I'd love to see what you did and how you did it. |
@ydmitry Hey, PRs are always welcome. Not sure it will be very helpful now, since current builder version explicitly depends on Angular Devkit 10, but it for sure will be a highly demanded feature in v11. |
OK, will try to do this weekends, actually it works with Angular in host mode (checked in another project). I assume need to fix "remote" mode |
Created a demo, everything is works when add "resolutions". Upgrading Here is the demo: Had to add following resolutions:
|
Tried your code, but got an error at
|
@qortex |
Yes I'm using yarn. Although I basically just use it, do not know much about the details :/ |
You may have to delete node_modules and execute yarn again. Even if your dependencies tree is flattened due to |
Ah makes sense. Now I get: [error] TypeError: Cannot destructure property 'bold' of 'core_1.terminal' as it is undefined.
at Object.<anonymous> (/home/mic/dev/qontrol/product/frontend/node_modules/@angular-builders/custom-webpack/node_modules/@angular-devkit/build-angular/src/angular-cli-files/utilities/stats.js:15:9)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (/home/mic/dev/qontrol/product/frontend/node_modules/@angular-builders/custom-webpack/node_modules/@angular-devkit/build-angular/src/angular-cli-files/utilities/bundle-calculator.js:5:17)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) My
(removed |
This shouldn't removed from resolutions. Resolutions allows not to load two different versions of dependencies. So you have:
You can remove second manually and see that it builds or error will be changed (if you need to resolve more dependencies) |
Indeed, works well! Thanks for the explanations. |
Latest version has been updated to the latest Angular deps. Can this issue be closed? |
Yes, updated example, works fine: https://github.com/ydmitry/angular11-webpack-module-federation-custom-webpack-builder/blob/main/package.json#L31 |
I have this issue with |
@qortex the same warning was earlier for sass-loader (or another styles-related loader), I think something was updated on loaders side and issue was resolved |
Maybe related to circular plugin aackerman/circular-dependency-plugin#60 |
Awesome, upgrading
|
There is an experimental support for Webpack v5 in the Angular CLI by angular/angular-cli#18820, and it was released in 11.0.0-next.3
Can you add support for webpack v5 in @angular-builders/custom-webpack ?
Thank you very much!
The text was updated successfully, but these errors were encountered: