-
Notifications
You must be signed in to change notification settings - Fork 59
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
AstroTurfLoaderError: Cannot use the decorators and decorators-legacy plugin together #140
Comments
Looks like a bug. We add a bunch of default parser options to ensure files are parsed but those are conflicting with your local config |
I ran into the same issue here :O |
There is conflict with project's |
Adding |
It's not intentionally opinionated, the parser requires picking one. Last I tried the two options were not compatible with each other. If that's different now I'm certainly open to it |
yeah, swap the |
If you want, I can open a PR in the morning. |
certainly open to it, but i'm still a bit skeptical since the new decorators spec had added different syntax like |
That decorator proposal never made it into babel, as far as I can tell. The decorator plugin only implements the original (legacy) and the revised proposal that only added a runtime. The static decorator proposal you are referring to has died. It's back to "decorators are functions"... very similar to the original (imo). ...and yes, that proposal is wild. Which actually makes me wonder if you should move to make this loader come after babel-loader so that you can avoid having to support unreleased proposals. |
yeah having to guess at parsing config is super annoying, we could actually just defer to babel if there is a local config but it's a bit tricky to do, even tho babel exposes the right API's now for doing that.
That is perfectly reasonable btw, as long as your babel setup isn't compiling tagged template strings, something that is a lot more likely now than a few years ago |
Yeah, that could even be articulated in the setup for people targeting very old runtimes... or error at startup? |
Nevermind, this loader doesn't transform the tag template literals... yeah, it's better to just ensure the parser can at least handle tags and let the user's config fill in the rest. |
I'm looking for css-in-js library for my project,
linaria
andastroturf
are in my preference.astroturf
looks better for me because we already use css modules using.less
.The problem is when I use
{ legacy: true }
for@babel/plugin-proposal-decorators
build will crash with error message:AstroTurfLoaderError: Cannot use the decorators and decorators-legacy plugin together
.My babel config is:
What i do wrong?
The text was updated successfully, but these errors were encountered: