-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private method support #708
Comments
(For what it's worth, I'm also running into other missing recent ES/TS features like EDIT: In fact, I've done a more thorough test, and it seems private method support is the only real blocker. Parcel and Snowpack have some correctness bugs that are impossible for us to work around at this point, so I'd really love to try |
Thanks for filing an issue! Sounds like we missed a few plugins for recent JS features. I've made a PR for private class fields. Will try to go through other syntax additions in the next week 👍 |
woo Thanks for the fix, I was able to use a local |
So, using (Unfortunately, it's hard for me to look for a more direct repro, because |
I forgot, https://unpkg.com/[email protected]/wmr.cjs shows that |
Reopening, so that this doesn't get lost. |
Hmm, so I did some more debugging, and using My leading theory now is that this is related to an issue where |
This is my current repro: git clone https://github.com/cubing/cubing.js; cd cubing.js
git checkout wmr2
npm install
npx wmr --version # verify that we're on `wmr` 3.4.1
npx wmr
open http://localhost:8080/src/sites/experiments.cubing.net/cubing.js/twisty/twisty-player.html This results in:
|
Describe the bug
Private methods in classes seem to break
wmr
To Reproduce
Steps to reproduce the behavior:
Add this code to e.g. the default template:
This results in:
Expected behavior
The code works.
Desktop (please complete the following information):
npm 7.15.0
node v16.2.0
macOS 11.4
wmr 3.1.0 (although
npx wmr --version
printswmr, 0.0.0
)Additional context
I previously filed an issue at #255 when I was last evaluating
wmr
but it didn't support private fields. Private fields seem to work now, but private methods don't. The relevant upstream change at alangpierce/sucrase#560 (pulled in by #428) suggests to me that private methods should have been supported inwmr
as soon as private fields were. I'm not sure what I'm missing here, but this would help unblock usingwmr
for a fairly major project.The text was updated successfully, but these errors were encountered: