How create-react-app parses the umd module (import xxx from'xxx.umd.js') #11561
Unanswered
spencer17x
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I found out that it is supported by webpack itself... |
Beta Was this translation helpful? Give feedback.
0 replies
-
I didn't write umdJS in the project. But when I read its example from the UMD repository, I found this (link):
So I can assume that the xxx.umd.js file is still treated as a js file? Module exports are normal because the standard umdjs syntax exposes |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I found that in create-react-app, the umd module can be parsed normally by import xxx from'./xxx.umd.js'. How is this done? Is it handled through webpack or babel? Is there a conversion from umd to esm? I did not find the source code of the relevant processing. Can you help me? thank you very much
Beta Was this translation helpful? Give feedback.
All reactions