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

feat(custom-webpack): support ESM #1117

Merged
merged 15 commits into from
Jan 30, 2022
Merged

feat(custom-webpack): support ESM #1117

merged 15 commits into from
Jan 30, 2022

Conversation

just-jeb
Copy link
Owner

@just-jeb just-jeb commented Jan 26, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

A build with @angular-builders/custom-webpack builder will fail if ran inside ESM app

What is the new behavior?

ESM fully supported

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Closes #1101

Copy link

@autoapproval autoapproval bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍

Copy link

@autoapproval autoapproval bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍

Copy link

@autoapproval autoapproval bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍

@just-jeb just-jeb changed the title Esm modules support hack feat(custom-webpack): support ESM Jan 28, 2022
@just-jeb just-jeb marked this pull request as ready for review January 28, 2022 16:25
@just-jeb
Copy link
Owner Author

@eng-dibo I'm not sure if we should add something specific about ESM support in the docs. WDYT?

@its-dibo
Copy link

add something specific about ESM support in the docs

Sure, it is a good feature and trendy these days. I see many mega packages updated their docs to mention that it now supports esm.

I see you merged the PR but the version in npm still 13.0.0

@its-dibo
Copy link

as you mentioned in the updated docs, tsconfig-paths doesn't support esm, alternatively there is another one tsc-alias that supports esm and runs in compile time instead of runtime (that gives better performance, but doesn't support runtime modules such as ts-node. I already opened an issue there)

usage:
tsc & tsc-alias

@just-jeb just-jeb merged commit 9d8cd2d into master Jan 30, 2022
@just-jeb just-jeb deleted the esm-modules-support-hack branch January 30, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ESM applications and configs
2 participants