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

Use with babelify transform #44

Open
giannif opened this issue Jan 7, 2016 · 4 comments
Open

Use with babelify transform #44

giannif opened this issue Jan 7, 2016 · 4 comments

Comments

@giannif
Copy link

giannif commented Jan 7, 2016

Hello,

I'm trying to run uglifyify with babelify and get source maps, not sure what I'm doing wrong.

Here's what I'm running:

browserify \
     -t [ babelify --presets [ es2015 react ] ]  \
     -g uglifyify index.js > bundle.js

I'm pretty sure you need to pass -d to browserify to get source maps, but when I do that my output isn't minified.

browserify -d \
     -t [ babelify --presets [ es2015 react ] ]  \
     -g uglifyify index.js > bundle.js

Source maps and minification work with minifyify, but I'm seeing better compression if I run uglify.

This works:

browserify -d \
     -t [ babelify --presets [ es2015 react ] ] \
     -p [minifyify --map bundle.map.json --output bundle.map.json] index.js > bundle.js

Any help would be appreciated.

@giannif
Copy link
Author

giannif commented Jan 7, 2016

Hmm. It seems like minifyify does use UglifyJS, but has an issue.

@danwdart
Copy link

This is now dying for me, I think it's because it doesn't understand the babel code...

@Fishrock123
Copy link

also running into issues here

@OutThisLife
Copy link

yep

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

4 participants