Browse Source

chore: 打包优化

es6
iapyang 5 years ago
parent
commit
0e713d9f3a
  1. 9
      Gruntfile.js
  2. 2
      webpack/webpack.prod.js

9
Gruntfile.js

@ -107,7 +107,7 @@ module.exports = function (grunt) {
bundleJs: { bundleJs: {
src: ["dist/core.js", "dist/fix/fix.js", "dist/base.js", "dist/case.js", "dist/widget.js", "dist/fix/fix.compact.js", "dist/router.js", "public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js", "dist/fineui.typescript.js"], src: ["dist/core.js", "dist/fix/fix.js", "dist/base.js", "dist/case.js", "dist/widget.js", "dist/fix/fix.compact.js", "dist/router.js", "public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js", "dist/fineui.typescript.js"],
dest: "dist/bundle.js" dest: "dist/bundle.js",
}, },
versionFineuiJs: { versionFineuiJs: {
@ -271,7 +271,12 @@ module.exports = function (grunt) {
uglify: { uglify: {
options: { options: {
banner: "/*! <%= pkg.name %> <%= grunt.template.today(\"yyyy-mm-dd HH:MM:ss\") %> */\n" banner: "/*! <%= pkg.name %> <%= grunt.template.today(\"yyyy-mm-dd HH:MM:ss\") %> */\n",
mangle: false,
sourceMap: true,
compress: {
unused: false,
},
}, },
dist: { dist: {
files: { files: {

2
webpack/webpack.prod.js

@ -28,7 +28,7 @@ module.exports = merge.smart(common, {
}), }),
new UglifyJsPlugin({ new UglifyJsPlugin({
test: /\.js(\?.*)?$/i, test: /\.js(\?.*)?$/i,
parallel: 16, parallel: true,
sourceMap: true, sourceMap: true,
uglifyOptions: { uglifyOptions: {
ie8: true, ie8: true,

Loading…
Cancel
Save