Modify Transpiler/Add "type": "module"
to package.json
#289
matthewoestreich
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
I am not really used to the whole module thing to be honest. I just use CRA. So I can barely say something about it. Why not release a major version and see if problems arise? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Quite a drastic reducing even on bundlephobia |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey @Domino987 I wanted to get your thoughts on this..
Currently, we use Babel to transpile our code (comes out to ~370kb). How would you feel about using
esbuild
to transpile? The output is about half the size at ~160kb.Doing so would also mean we would have to specify
"type": "module"
in our package.json file. This is because others need to know thatimport
/export
must be used when using our library. Which shouldn't be an issue because it's a React library, which uses ES6 features by default (and the consumer is already responsible for transpiling the code further if they wish).Thoughts?
I have already been testing this and it appears I have resolved all prior issues.
Beta Was this translation helpful? Give feedback.
All reactions