Comments (5)
So you're requiring package.json
through browserify, correct? uglifiyify ignores .json files – if you really want to squeeze more characters out of your bundle then you should run it all through uglify.js after using uglifyify.
from uglifyify.
I'm actually requiring those dependencies in my main application JS file:
var $ = require('jquery');
var Backbone = require('backbone');
Backbone.$ = $;
var Foo = require('./components/foo.js');
The resulting bundle has foo.js minified, but jQuery and all the other libs are not minified.
This isn't a huge deal, I can run everything through uglify as you mentioned. I just wanted to check if this was expected behavior or if I was doing something wrong. Thanks!
from uglifyify.
Ah, in that case you need to use a global transform in order to get your dependencies minified too :) Instructions are in the README: https://github.com/hughsk/uglifyify#global-transforms
from uglifyify.
Oh, I guess I misread that section. Works as expected now.
Thanks again! Sorry for the false alarm 😄
from uglifyify.
Hehe, all good :)
from uglifyify.
Related Issues (20)
- Optional chaining support
- Update terser up to 4.8.1 HOT 1
- update to a maintained `through`?
- command line usage does not work HOT 2
- (v4) `ignore` is not a supported option HOT 2
- (v4) How to use "extensions" (-x, --exts) with node HOT 2
- Add CHANGELOG.md HOT 4
- Add better tests HOT 2
- Uglifyify fails when calling uglify HOT 3
- Missing command line entry
- --ignore flag being ignored in Jenkins environment HOT 2
- New dependency name: uglify-es => terser #1 HOT 2
- Fatal error: `ignore` is not a supported option while parsing file: HOT 2
- Update to [email protected]
- Inlined sourcemaps
- Global flag is ignored
- beautify does not work; should be an output option
- update package extend to >2.0.2 to remove package vurnerability HOT 1
- Wrong CLI option for Source Maps in README.md
- SyntaxError: 'return' outside of function while parsing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uglifyify.