diff --git a/lib/postbuild/postbuild.js b/lib/postbuild/postbuild.js index 98dcad2d75..8ec0397be6 100644 --- a/lib/postbuild/postbuild.js +++ b/lib/postbuild/postbuild.js @@ -15,7 +15,9 @@ function unionJs(filenames) { ); }); - concat.add(null, `//# sourceMappingURL=${filename}.map`); + const filenameParts = filename.split("/"); + + concat.add(null, `//# sourceMappingURL=${filenameParts[filenameParts.length - 1]}.map`); var concatenatedContent = concat.content; var sourceMapForContent = concat.sourceMap; @@ -33,4 +35,5 @@ unionJs(["bundle.min.js", "fineui.typescript.js"]); unionJs(["bundle.ie.min.js", "fineui.typescript.ie.js"]); unionJs(["fineui.min.js", "fineui.typescript.js"]); unionJs(["fineui.ie.min.js", "fineui.typescript.ie.js"]); -// unionJs(["bundle.min.js", "fineui.typescript.js"]); +unionJs(["2.0/fineui.min.js", "fineui.typescript.js"]); +unionJs(["2.0/fineui.ie.min.js", "fineui.typescript.ie.js"]); diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js index c3893a777a..1c8458ded3 100644 --- a/webpack/webpack.prod.js +++ b/webpack/webpack.prod.js @@ -13,6 +13,20 @@ const common = require("./webpack.common.js"); module.exports = merge.smart(common, { mode: "production", + optimization: { + minimizer: [ + new UglifyJsPlugin({ + parallel: true, + sourceMap: true, + uglifyOptions: { + ie8: true, + output: { + comments: false, + }, + } + }) + ] + }, devtool: "hidden-source-map", @@ -26,17 +40,6 @@ module.exports = merge.smart(common, { path: dirs.DEST, filename: "fineui.typescript.css", }), - new UglifyJsPlugin({ - test: /\.js(\?.*)?$/i, - parallel: true, - sourceMap: true, - uglifyOptions: { - ie8: true, - output: { - comments: false, - }, - }, - }), new webpack.BannerPlugin({ banner: `time: ${new Date().toLocaleString()}`, }),