4 ms·
The way the minifier is currently implemented is just as a babel preset. We figured users would want to use the tool standalone without babel and the simpliest
by hzoo 10y ago
The way the minifier is currently implemented is just as a babel preset. We figured users would want to use the tool standalone without babel and the simpliest thing we thought of was to wraps babel-cli and pass in the preset.
https://github.com/babel/babili/blob/master/packages/babili/src/index.js https://github.com/babel/babili/blob/master/packages/babili/...
I was thinking about using bundledDependencies or maybe just running webpack/rollup over the whole thing, feel free to make an issue.
- anotherthing 10y ago`npm install babili` is 33M. Should users know or care what a babel preset is? They just want to minify code.
- hzoo 10y agoMaybe I didn't word that correctly. It was created as a set of babel plugins but because like you said users shouldn't know what a babel preset is we have the cli tool which acts the same as babel-cli so you don't need to do all of that. Yes, it doesn't need to be 33M that's just a result of the way it was used (babel-cli is that big) and I'm saying that it's something that we can fix
- anotherthing 10y agoAny plans to release minified versions of babili? It would probably shave 90% off the install size.
- timdorr 10y agoHaving readable backtraces when something goes wrong is far more valuable to me than saving a couple dozen MB on a 512GB drive.
- BinaryIdiot 10y agoThen no one would ever minify. Minify makes it faster to download and install (even in some cases it can make the code faster due to some optimizations though I wouldn't bank on it). You minify deployments and, if someone needs to debug, switch to a debug version of the code.
- timdorr 10y agoEdit: maybe there is some confusion. I'm talking about minifying the tooling, not end user code.
- remarkbabel 10y agoThe tools should be minified to reduce their download size and make them run faster (quicker parsing).
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- BinaryIdiot 10y ago> We figured users would want to use the tool standalone without babel and the simpliest thing we thought of was to wraps babel-cli and pass in the preset. With all the other minifiers out there the only real draw here is you're already using babel so toss the minifier at it. If anyone, other than for the novelty of it being new, actually downloads babel ONLY to use the minifier I will eat my hat.
- amasad 10y agoES6 support is another reason why. And also, once we start doing advanced optimizations you might want to marinate that hat in some nice sauce.
- BinaryIdiot 10y ago> ES6 support is another reason why. Most will be transpiling that ES6 into ES5 so support isn't that necessary. > And also, once we start doing advanced optimizations you might want to marinate that hat in some nice sauce. Better optimizations than Google Closure and / or Uglifier? Color me skeptical and good luck :)