Minify multiple files with UglifyJS

后端 未结 3 2077
温柔的废话
温柔的废话 2021-01-30 11:11

Is it possible to compress multiple files with UglifyJS?

Something like...

uglifyjs -o app.build.js appfile1.js appfile2.js ...

Also, I

3条回答
  •  甜味超标
    2021-01-30 11:36

    For future readers of this question, w/ UglifyJS2, this is trivial now...

    uglifyjs file1.js file2.js -o foo.min.js
    

    There is also support for source maps too.

    uglifyjs file1.js file2.js -o foo.min.js --source-map foo.min.js.map --source-map-root http://foo.com/src
    

提交回复
热议问题