-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix(schematics): restore CommonJS module output for Node.js compatibi… #5051
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
Conversation
…lity Changes tsconfig.schematics.json to output CommonJS modules instead of ES modules. Angular schematics run in Node.js which expects CommonJS format by default. Fixes #5050
✅ Deploy Preview for ngrx-io ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for ngrx-site-v21 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good catch! I think we also should also update this for the other *.schematics.json files as well.
|
@timdeschryver seems that |
Angular Schematics still run under CommonJS. That's why the
tsconfig.schematics.json, has to revert its output viamoduleResolution: "node".This fix has been successfully tested locally, via publishing to verdaccio and doing a fresh installation via
npx ng add @ngrx/schematics.As a follow-up/separate issue,I would suggest introducing a integration test, which creates a new Angular workspace and executes the schematics on it.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Closes #5050
What is the new behavior?
Does this PR introduce a breaking change?