withNx should support custom transform react runtime #33199
mola-molaa
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
when @nx/rollup withNx function set compiler as 'swc', then
package's .swcrc set transform react runtime as 'classic',
tsconfig.json set jsx: "preserve"
after build, index.esm.js in dist still has import {jsx } from 'react/jsx-runime' however the react version is 16;
I found that withNx, when compiler is set 'swc', swc plugin is hardcode ”runtime: automatic“
https://github.com/nrwl/nx/blob/master/packages/rollup/src/plugins/swc.ts
https://github.com/nrwl/nx/blob/master/packages/rollup/src/plugins/with-nx/with-nx.ts#L307
hope withNx function makes developer able custom the runtime option or should the swc plugin respect to package .swcrc
Beta Was this translation helpful? Give feedback.
All reactions