@babel/parser in browser #14853
Answered
by
nicolo-ribaudo
k644606347
asked this question in
Q&A
-
I try to run @babel/parser ^ 7.18.9 in the browser to parse strings and display ast. I use webpack to build applications. It works well, but what is the problem with this? I want the CDN version of @babel/parser, but the official only provides CJS. Maybe the official does not recommend running @babel/parser in the browser? |
Beta Was this translation helpful? Give feedback.
Answered by
nicolo-ribaudo
Aug 13, 2022
Replies: 3 comments 4 replies
-
You can load it from the skypack CDN: import { parse } from "https://cdn.skypack.dev/@babel/parser" or const { parse } = await import("https://cdn.skypack.dev/@babel/parser") |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
k644606347
-
same issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
can we use babel parse function by import only babel standalone? |
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
You can load it from the skypack CDN:
or