-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Issue with browserify-shim #56
Comments
Because the $ npm run babel-before Works without a problem. |
Hey @sebmck thanks for the response! I'm getting an error. The only way I can get it to run is without using babelify. The only reason it works is because I'm not using es6 imports in that repo 😿 For SEO:
|
@sebmck It's just apparent that it's a babilfy issue then because it works without babelify. That's why I wen't with |
@reggi You should be ignoring $ browserify -t [babelify --ignore \"bower_components\" browserify-shim] Since otherwise |
@reggi I took a quick look at your repo and # backslashes for readability only
node ./node_modules/.bin/browserify ./index-es6.js \
-t [ babelify --ignore bower_components ] \
-t browserify-shim \
--debug \
> es6-polymer-babel-index-shimmed.js You need to ignore If you're curious about why polymer didn't like to get babeled, it's because it doesn't seem to work in strict mode. If you turn off that babel transform, it also works: node ./node_modules/.bin/browserify ./index-es6.js \
-t [ babelify --blacklist strict ] \
-t browserify-shim \
--debug \
> es6-polymer-babel-index-shimmed.js Though, it's more efficient to simply ignore PS: There is no |
This seems resolved to me. |
I seem to be running in circles with this.
The original issue is in thlorenz/browserify-shim#145
If I run
-t [browserify-shim]
and use normal CommonJS syntaxrequire()
then the browserify bundle works perfectly.If I run
-t [babelify --only \"./index.js\" browserify-shim] and use es6
import` syntax I get an error within my imported shimmed dependency (polymer).There's a simple demo here:
https://github.com/reggi/demo-browserify-polymer-es6
Why would it compile perfectly without
babelify
and when I specify--only
it have a different effect on my included shimmed dependency?The text was updated successfully, but these errors were encountered: