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
Published node module not ES5 #746
Comments
Hi @jasperkuperus! Fixed and will be released in |
Hi @Anber . Thanks for the quick reply! It looks like the spread operators are gone indeed. But now I'm running into the same issue with arrow functions: This unfortunately also lets my older browsers crash :( Can we reopen this? |
Ouch! |
btw, do you know that property-based interpolation for |
Yes, I'm well aware. I think I can get away with that and for these browsers I aim for graceful degradation. Some styling that didn't get picked up by the browser is OK, but the app crashing is not 😊 |
Ok! I'll release a fix in a couple of days. |
Perfect, again thanks for the fast/adequate response! Please keep me posted on when you publish it! |
In order to avoid future reopenings, could you please replace these files in your local node_modules and confirm, that everything is ok? :) |
Still has the same issue. So, as I've set Quick and maybe silly question. Why not add a transpiler like Babel and make sure it transpiles the code before publishing it? That way you can keep using your favourite language constructs and users of the library are free to use it in any environment. And more importantly, if you forget to take this into account one day and accidentally write an arrow function, you won't break anyone's app 😊 |
It's transpilled: to es3 in |
Ah, pardon me for thinking it's not transpiled. I'll be happy to test it when it's published! |
@Anber When are you going to publish this to npm? I'd like to test it 😊 |
@jasperkuperus done! |
Tested
So consindering your intended approach @Anber , of having es3 in |
Hi @jasperkuperus! Take a look at that config option https://webpack.js.org/configuration/resolve/#resolvemainfields |
I considered, but that would make the switch on all my libraries, but at this moment only linaria was an issue for me. I might have to go down that path one day though. Thanks!
…Sent from my iPhone
On 24 Apr 2021, at 14:46, Anton Evzhakov ***@***.***> wrote:
Hi @jasperkuperus!
Take a look at that config option https://webpack.js.org/configuration/resolve/#resolvemainfields
If you want to support old browsers, you probably need to specify main as a first option.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Environment
Description
First off, I really like this lib. Keep up the good work.
The version of linaria that's published to npm isn't transpiled down to ES5 properly. I noticed due to spread operators, originating from
@linaria/core
, landing in mybundle.js
that made older browsers crash. I guess the module should be properly transpiled to ES5 before publishing it to npm.While investigating, I noticed that I was on this-> I managed to get3.0.0
beta. So I figured to downgrade to2.1.0
, which I saw in the releases. But it didn't allow me... Must be some renamed packages? Couldn't find any instructions on this.2.1.0
installed, but same issue there with spread operators in published package.Reproducible Demo
n/a
The text was updated successfully, but these errors were encountered: