Why does Parcel wrap all my imported JS variables in parenthesis with the number 0? #9287
Unanswered
philiprenich
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I'm new to Parcel and curious about how it is bundling things up in development mode. If I have a simple file:
The rendered code that I can see contains (in part)
That
(0, _config.TEST_VAR)
is what I'm curious about. There are weird syntax things about JS I don't know, but generally this does nothing from what I can tell. The second item in the list is always returned, whether it's undefined or not. What's the point of this?(side bonus question, is it expected that in dev mode I'll see a ton of Parcel code, hot reloading code, etc in my JS making it extremely difficult to debug and set breakpoints in the browser?)
Beta Was this translation helpful? Give feedback.
All reactions