Skip to content
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

Unclear if it works with Node #8

Closed
oriSomething opened this issue Dec 15, 2019 · 3 comments
Closed

Unclear if it works with Node #8

oriSomething opened this issue Dec 15, 2019 · 3 comments

Comments

@oriSomething
Copy link

I'm not sure if I have an app that the code compiled both to Node (specifically Electron main thread) and modern browsers while using Webpack to compile will work well with what Node versions.
It's true I just test it locally, but I think it will be a good idea to write something about it in the readme.

@nicolo-ribaudo
Copy link
Member

This preset shouldn't be used with Webpack: the only guarantee is that the compiled code will work if you are using native ECMAScript modules.

@developit
Copy link
Member

developit commented Dec 18, 2019

It's okay to use with Webpack as long as you serve the result using <script type=module>.

Regarding Node compatibility, none of the transforms here are necessary for V8, the engine Node runs on. That means preset-env with targets.node is already fairly well-optimized output for Node.

@oriSomething
Copy link
Author

Maybe, it should be added (the explanation on Node) to the Readme?

developit added a commit that referenced this issue Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants