-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
bundling is not transpiling es6 #478
Comments
@u9520107 ES6 transpilation only happens for ES6 modules, not ES6 files written in CommonJS. Transpiling ES6 features for other module formats can certainly be a feature to consider. |
This exact question has raised for me today. So, transpilation is "activated" only for ES6 modules, i.e. files that have either 'import' or 'export' statements in them, and not for every ES6-syntax file in project code folder, right? |
Yes exactly. If you have an ES6 file with no module syntax, you can add |
@guybedford What if is someone else's code? Is there a possibility at install time to specify that the module should be treated as es6? |
Yes this is done with overrides - |
@guybedford cool.. I'll try definitely try that out. Probably enough to fixed the problem for me. |
@guybedford Turns out that transpiling the aforementioned package doesn't fix the issue I had. The problem is with the package itself though. They should be releasing a new version that'd fix the issue pretty soon. Closing this since it's not really jspm's problem. |
Hello! It seems I am getting a similar problem... and The file is transpiled on the browser (even without format es6) but bundling is not transpiling it at all... maybe I am missing something and for the current version should be done in a different way.... any help would be appreciated. Thanks! |
@fernandogmar Did you try something like this in your config? packages: {
"tj/co@0.4.2": {
"meta": {
"*.js": {
"format": "es6"
}
}
}
} |
I was under the impression that bundling would trigger transpiling if sources contain es6 code. But I just happened to include a project with generators used in the source, and found that the generator was passed to the client without being transpiled. Furthermore, when system.js failed to fetch stuff from the bundle, it seems to attempt to import the unbundled source, which somehow the es6-module-loader also failed to transpile the code on the fly.
Tested in osx and windows with JSPM version 0.11.3, and node version 0.11.14.
right.. the project I included was tj/co@0.4.2
The text was updated successfully, but these errors were encountered: