-
Notifications
You must be signed in to change notification settings - Fork 37
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
Bug in 2.2.0 – "default" element created #21
Comments
That's extremely odd. Would you be able to provide a minimal example of how this is being used (inc babel usage etc) I get the feeling this will be some incompatibility with babel, maybe it doesn't implement Proxies correctly? I'm installing chrome canary now to have a look, but it works fine in electron. |
Yeah I was trying to work out where that |
Hmm, works fine here which suggests it is to do with module imports. I'll try setting up a repo with my environment but it might be difficult! Any ideas how I could debug this in my own project? |
This fiddle also works fine when babel is turned off, in canary (51.0.2679.0): https://jsfiddle.net/q1dkv5mp/ (it wont work in current normal chrome 48.0.2564.116) So I'm not really sure how to help without more info on how you're using it. |
Ok I'll keep digging, thanks for trying. |
oh i know whats happening. under the covers somewhere, babel/something is doing:
And because crel returns a bound fn with the string The exact same output would be achieved via:
|
Ah ok! So is this something that should be handled by crel, or is it a bug in babel / webpack / something else? |
This is absolutely a bug in whatever is doing the |
Actually if you have this breaking, add this:
after this line: https://github.com/KoryNunn/crel/blob/master/crel.js#L148 in your node_modules version of crel, and past the stack here. |
Ok so webpack+babel is outputting the following:
This ends up using the Proxy API and trying to create a |
I can probably fix this by adding special handling around the The previous version is identical other than the Proxy support, so I'd go with it until the issue is resolved in babel/webpack |
I agree that it's not an ideal solution. But might it be a bit dangerous to automatically call |
Actually I'll throw up a PR in a sec that solves all proxy issues |
v3 is published. |
Hi there, first of all crel is awesome and been using it for ages without any problems.
I just updated to crel
2.2.0
in a project using Babel 6 with es2015 and stage-3 presets, and am getting the following weird behaviour:I don't know how to begin debugging this because I forked crel and ran
npm test
and all tests passed... I guess this must have to do with the new Proxy API support because that's the only major thing that's changed since2.1.8
, which works fine. Any pointers? Thanks!The text was updated successfully, but these errors were encountered: