-
Notifications
You must be signed in to change notification settings - Fork 508
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
Output not being compiled-down #101
Comments
i think @jaredpalmer has strong feelings about this one. i think it is a good idea to try to ship modern js in libraries and force downstream toolkits to change. any idea why CRA doesnt do the transpile? edit: looks like CRA v2 does do this! see this long ass issue. facebook/create-react-app#1125 (comment) the bar has shifted, as Dan says in that issue. “normal setups” should adjust accordingly. |
@sw-yx Didn't know create-react-app added that. Unfortunately some tools (parcel for one)/custom webpack setups aren't configured out the box to transpile node_modules. How about keeping |
🤷🏼♂️this is jared's call. |
Oof. 😐 |
I'm also having issues with spread operator not being transpiled |
Will investigate in the mornjng |
I think this must have to do with cjs settings. |
Can someone explore this? |
I can take a look, but need to gather a little context. Looks like there's a PR to add should the output be compiling down, but something's up with the cjs settings? |
Honestly I haven’t diagnosed the root issue. What I know right now is that Formik’s old Rollup config was fine (on master), but the tsdx is not for cjs |
Np. I can hunt for the root issue. I just wanted to confirm what the expected behavior is. |
Figured it out. There was a |
Current Behavior
Currently the output is not being transpiled so it can be supported on older browsers eg.
class {}
.Suggested solution(s)
Use
@babel/preset-env
and default to ES2015 outputAdditional context
It's problematic because some setups don't transpile node_modules. This prevents extending classes from
tsdx
as babel doesn't like es5->es6 interop.The text was updated successfully, but these errors were encountered: