diff --git a/README.md b/README.md index 7d10518..a356f5d 100644 --- a/README.md +++ b/README.md @@ -136,8 +136,10 @@ fis 中对依赖的js 加载,尤其是异步 js,需要一个 js loader。 }, css: function (file) { return "/static/css/" + file.filename + "_aio.css"; - } - } + }, + //默认`false`. 打包文件后使用`uglify-js`压缩js文件(注意:该功能与`sourceMap`等属性冲突),配置详细请参见 https://github.com/mishoo/UglifyJS2 + urglifyJs: {} + } }) ``` - `css` all in one 打包后, css 文件的路径规则。默认为 `pkg/${filepath}_aio.css` diff --git a/index.js b/index.js index b38b5b9..1df2c01 100644 --- a/index.js +++ b/index.js @@ -147,6 +147,7 @@ rudePackager.defaultOptions = { js: '', // 打包后 js 的文件路径。 includeAsyncs: false, // 可以配置成 true 用来包含异步依赖。 ignore: null // 忽略列表,可以配置部分文件不被 all in one. + urglifyJs: false, //js文件合成后压缩, 配置见 https://github.com/mishoo/UglifyJS2 }*/, // 是否捕获页面内的