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
@nrwl/web: Rollup executor forces code output to be ES5 #8639
Comments
Hey, when you create a library the default format is both Based on your description you want the output to be To achieve this you can:
After you build the library check the |
@ndcunningham Sorry, but I have a different issue 🙂 I can configure Please check "Current Behavior" behavior section and "Steps to Reproduce". |
When you use swc as the compiler for a library the types should be generated ISSUES CLOSED: nrwl#8639
When you use swc as the compiler for a library the types should be generated ISSUES CLOSED: #8639
When you use swc as the compiler for a library the types should be generated ISSUES CLOSED: nrwl#8639
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Intro
I am using
@nrwl/web
executor:In my TS configs I am targeting
ES2019
:Current Behavior
UMD and CommonJS outputs are forced to use
target: "es5"
by this line:nx/packages/web/src/executors/rollup/rollup.impl.ts
Lines 312 to 313 in 5afd3d6
The following code is compiled:
⬇️⬇️⬇️
That matches ES5 output 🙃
target: es5
target: es2019
Expected Behavior
I went through existing/closed issues (#3601, #4115) and fixes for them kept that line without changes.
As
target: es2019
supports all features for that snippet I expect will not apply any transforms (as in playground):Proposal
I think that it's reasonable to remove that line at all and respect user's configuration.
Steps to Reproduce
Manual steps
npx create-nx-workspace --preset=react
nx g @nrwl/react:library --publishable --importPath=test
libs/test/src/lib/test.tsx
yarn nx run test:build
dist/libs/test/index.umd.js
Ready to go
npm install
nx run test:build
dist/libs/test/index.umd.js
Environment
The text was updated successfully, but these errors were encountered: