Skip to content

Commit

Permalink
Merge pull request #122 from viljamis/hotfix/minify-build
Browse files Browse the repository at this point in the history
Hotfix/minify build
  • Loading branch information
arielsalminen authored Oct 9, 2018
2 parents a2d5f21 + 0907dcc commit 93bc1be
Show file tree
Hide file tree
Showing 13 changed files with 188 additions and 1,701 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package.json
package-lock.json
src/assets/tokens/*
src/assets/tokens/*
dist/*
7 changes: 4 additions & 3 deletions build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const OptimizeCSSPlugin = require("optimize-css-assets-webpack-plugin")
const UglifyJsPlugin = require("uglifyjs-webpack-plugin")
const TerserPlugin = require("terser-webpack-plugin")
const SafeParser = require("postcss-safe-parser")

const env = require("../config/prod.env")
Expand Down Expand Up @@ -88,9 +88,10 @@ const webpackConfig = merge(baseWebpackConfig, {
},
},
runtimeChunk: "single",
minimize: true,
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
new TerserPlugin({
terserOptions: {
compress: {
warnings: false,
},
Expand Down
10 changes: 0 additions & 10 deletions build/webpack.system.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const baseWebpackConfig = require("./webpack.base.conf")
const MergeWebpackPlugin = require("webpack-merge-and-include-globally")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const OptimizeCSSPlugin = require("optimize-css-assets-webpack-plugin")
const UglifyJsPlugin = require("uglifyjs-webpack-plugin")
const CopyWebpackPlugin = require("copy-webpack-plugin")
const SafeParser = require("postcss-safe-parser")

Expand Down Expand Up @@ -41,15 +40,6 @@ const webpackConfig = merge(baseWebpackConfig, {
new webpack.DefinePlugin({
"process.env": env,
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
},
},
sourceMap: config.system.productionSourceMap,
parallel: true,
}),
// extract css into its own file
new MiniCssExtractPlugin({
filename: utils.assetsSystemPath("[name].css"),
Expand Down
2 changes: 0 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ module.exports = {
// Enable or disable performance hints on build
performanceHints: false,

// Source map
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: "#source-map",

Expand Down
Loading

0 comments on commit 93bc1be

Please sign in to comment.