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
ES6 support #683
ES6 support #683
Conversation
@@ -4,7 +4,7 @@ | |||
"author": "Tobias Koppers @sokra", | |||
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.", | |||
"dependencies": { | |||
"esprima": "~1.2.0", | |||
"esprima-fb": "^8001.2001.0-dev-harmony-fb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I saw NPM 2.0 erroring on this kind of thing since it's not allowed to reference -dev
versions in new semver. Not sure though.
hmm... We need to redesign this to get all advantages of ES6 modules. Instead of tracking which module is requested, we need to track which export is requested. That way we can optimize away unused imports/exports and remove modules that only reexport (which is a common pattern for package entries, i. e. react-router) |
👍 |
This would be rad. |
I'd recommend using acorn over esprima. It has far better ES6 support, and is much faster. |
What about System? for example: https://github.com/systemjs/systemjs |
System has nothing to do with ES6 support as far as I read it out. |
System is a part of ES6 Look par.8 http://www.2ality.com/2014/09/es6-modules-final.html |
|
Agree with @sebmck. esprima support will likely take some time. Acorn also uses the mozilla parser API.. |
closed in favor of #857 |
https://github.com/webpack/webpack/tree/harmony/examples/harmony#examplejs