-
Notifications
You must be signed in to change notification settings - Fork 28
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
Browserified NPM dependencies are not transpiled #97
Comments
I have the same problem. Do you know of any workaround? |
Browserify supports "transforms", and you can use them with this addon (see the README.md). There is a browserify transform that uses babel, but I haven't tried it. See https://github.com/babel/babelify |
Valid until ef4/ember-browserify#97 gets fixed
After a lot of time, I've still issues with this task, a pointer to some example would be very welcome, thanks for any help. |
The use-case I'm having trouble with is when using ES6 NPM modules. They aren't being transpiled: eg: // app.js
import "npm:whatwg-url";
import Ember from "ember";
... The |
Yeah, browserify is probably not the right tool for that use case. It really should be built into ember-cli. But in this particular case, somebody has already packaged the URL polyfill for ember-cli: https://github.com/tchak/ember-url |
I initially opened this issue against ember-cli and was informed that this addon is the best place to address this currently. For reference: ember-cli/ember-cli#6170
We are using Ember CLI along with Ember Browserify to manage a number of our client-side dependencies. In one of our new packages the author elected to write some modules using ES2015 features/syntax. The package is also used server-side in a Node 4.x environment and this works without issue.
I have a repro project here: https://github.com/sohara/halp-markdown
Basically I added a dependency that exposes a function that uses
const
which should be transpiled if using theES2015
Babel preset. The const remains in the source if you inspect the buildvendor.js
file. Works fine in current Chrome. Here's source of the npm packages's entry file:This older issue: #60 was closed but I don't think it was ever really addressed.
The comment from @nathanhammond in the linked Ember CLI issue is informative and may provide insight as to how this issue might be addressed.
Output from ember version --verbose:
The text was updated successfully, but these errors were encountered: