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
Treeshaking of arguments leads to SyntaxError #2909
Comments
Error seems related with acornjs/acorn#136 |
The argument's start/end does not include the surrounding parentheses, looking into a solution... |
I think the solution could be to set |
I was thinking about that, but I agree it would shake many things up and it would create a non-standard syntax tree. Meanwhile I found a simpler solution, which is to just find the next "," after the argument :) PR upcoming |
Fix at #2910 |
@lukastaegert damn! pushed a PR 30 seconds ago |
same fix!!! haha |
How Do We Reproduce?
https://rollupjs.org/repl?version=1.14.4&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmltcG9ydCUyMCU3QndyaXRlR2VvbWV0cnklN0QlMjBmcm9tJTIwJy4lMkZtYXRocy5qcyclM0IlNUNuY29uc29sZS5sb2cod3JpdGVHZW9tZXRyeSklM0IlMjIlMkMlMjJpc0VudHJ5JTIyJTNBdHJ1ZSU3RCUyQyU3QiUyMm5hbWUlMjIlM0ElMjJtYXRocy5qcyUyMiUyQyUyMmNvZGUlMjIlM0ElMjJleHBvcnQlMjBmdW5jdGlvbiUyMHdyaXRlR2VvbWV0cnkoZ2VvbWV0cnklMkMlMjBvcHRfb3B0aW9ucyklMjAlN0IlNUNuJTIwJTIwcmV0dXJuJTIwd3JpdGVQb2ludEdlb21ldHJ5KChnZW9tZXRyeSklMkMlMjBvcHRfb3B0aW9ucyklM0IlNUNuJTdEJTVDbiU1Q25mdW5jdGlvbiUyMHdyaXRlUG9pbnRHZW9tZXRyeShnZW9tZXRyeSUyQyUyMG9wdF9vcHRpb25zKSUyMCU3QiU1Q24lMjAlMjByZXR1cm4lMjAlN0IlNUNuJTIwJTIwJTIwJTIwdHlwZSUzQSUyMCdQb2ludCclMkMlNUNuJTIwJTIwJTIwJTIwY29vcmRpbmF0ZXMlM0ElMjBnZW9tZXRyeSUyQyU1Q24lMjAlMjAlN0QlM0IlNUNuJTdEJTVDbiUyMiUyQyUyMmlzRW50cnklMjIlM0FmYWxzZSU3RCU1RCUyQyUyMm9wdGlvbnMlMjIlM0ElN0IlMjJmb3JtYXQlMjIlM0ElMjJjanMlMjIlMkMlMjJuYW1lJTIyJTNBJTIybXlCdW5kbGUlMjIlMkMlMjJhbWQlMjIlM0ElN0IlMjJpZCUyMiUzQSUyMiUyMiU3RCUyQyUyMmdsb2JhbHMlMjIlM0ElN0IlN0QlN0QlMkMlMjJleGFtcGxlJTIyJTNBbnVsbCU3RA==
Expected Behavior
It should generate valid JS:
Actual Behavior
It does generate JS with syntax errors:
^ notice the missing closing
)
aftergeometry)
.Real world
This issue was first reported by an user of stencil when trying to use the
ol
(open layers) https://www.npmjs.com/package/ol package.ionic-team/stencil#1607
Specifically this piece of the code:
The text was updated successfully, but these errors were encountered: