Replies: 1 comment 5 replies
-
Can you share your snowpack config file? If you're using Babel to build your files, you may need to add a babel plugin to support this newer syntax. esbuild powers our built-in file build by default, which does support private syntax. Our older React/Preact CSA templates used Babel, but our latest templates now use esbuild by default. Trying out the new CSA template (or, just grabbing the latest config file from one of them) should solve this problem for you as well. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I try to build (with
snowpack build
), I'm getting this error:Unexpected token (4:2)
, which maps to#test()
.If I change
#test()
to (for example)_test()
, the issue disappears. Is there an option to make snowpack to recognize private class fields by default?Beta Was this translation helpful? Give feedback.
All reactions