Skip to content
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

Support Angular 13 #1049

Closed
DavidDudson opened this issue Nov 3, 2021 · 10 comments
Closed

Support Angular 13 #1049

DavidDudson opened this issue Nov 3, 2021 · 10 comments

Comments

@DavidDudson
Copy link

Is your feature request related to a problem? Please describe.

Due to this plugin depending on an old @angular version, it fails to work with angular 13. I believe this is due to a typescript version change. causing the legacy @ngtools/webpack plugin to no longer work

/webpack/src/ivy/plugin.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from ../package.json

Describe the solution you'd like

A new major version of @angular-builders/jest and @angular-builders/custom-webpack both supporting angular 13

Additional context
There is a workaround. Adding:

  "resolutions": {
    "@angular/compiler": "13.0.0",
    "@angular/cli": "13.0.0",
    "@angular-devkit/build-angular": "~13.0.0"
    }

to package json and this works fine.

@abadakhshan
Copy link

@DavidDudson

You could find a solution here #1050

@just-jeb
Copy link
Owner

just-jeb commented Nov 4, 2021

This PR will resolve it. You're not supposed to use Angular Builders 12 with Angular 13 (see the docs). I expect the PR to be merged in the next few days, please be patient 😄

@DavidDudson
Copy link
Author

DavidDudson commented Nov 4, 2021

angular-builders-jest is also a dep of ours, they just released a prerelease version (11.X) which seems to work perfectly for us!

Thanks for the quick PR <3

@just-jeb
Copy link
Owner

just-jeb commented Nov 7, 2021

You're welcome to check out the preview version 13.0.0-beta.0 (under the next tag).

@gabynevada
Copy link

@just-jeb I get the following error when trying ng build using the beta

Error: Cannot find module 'webpack-sources'

After installing webpack-sources package everything works as expected, including the new angular cache.

Thanks!

@just-jeb
Copy link
Owner

just-jeb commented Nov 7, 2021

@gabynevada Hey, I suspect it's a broken lock file. Try to remove it and regenerate again (remove the webpack-sources from direct dependencies before regeneration).

@DavidDudson
Copy link
Author

@just-jeb that beta version works perfectly. I think this is close to record timing that all our dependencies have been working (even if they are still all pre-release) after an angular upgrade, thank you very much! It means we can thoroughly test our applications while waiting for full releases.

@gabynevada
Copy link

@just-jeb Perfect! That was the issue.

Thanks! All working great

@just-jeb
Copy link
Owner

just-jeb commented Nov 8, 2021

@DavidDudson doing my best 😄 The stable release won't take long, I'm working on integrating a new builder, then a few minor doc updates and we're good to go.
Unless you discover any issues of course.

@just-jeb
Copy link
Owner

just-jeb commented Nov 9, 2021

Aaaand v13 is officially out.

@just-jeb just-jeb closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants