Skip to content

Commit

Permalink
Merge pull request crabbly#392 from natalan/update-webpack-source-map
Browse files Browse the repository at this point in the history
Update webpack source map
  • Loading branch information
crabbly authored Dec 26, 2019
2 parents 54d84af + aecc054 commit 1fff274
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,30 @@
"types": "src/index.d.ts",
"repository": "https://github.com/crabbly/Print.js",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@babel/core": "7.4.5",
"@babel/preset-env": "7.4.5",
"@babel/core": "7.7.2",
"@babel/preset-env": "7.7.1",
"babel-loader": "8.0.6",
"coveralls": "3.0.4",
"css-loader": "2.1.1",
"coveralls": "3.0.8",
"css-loader": "3.2.0",
"istanbul-instrumenter-loader": "3.0.1",
"jasmine-core": "3.4.0",
"jasmine-core": "3.5.0",
"karma": "4.1.0",
"karma-chrome-launcher": "2.2.0",
"karma-coverage": "1.1.2",
"karma-jasmine": "2.0.1",
"karma-phantomjs-launcher": "1.0.4",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "3.0.5",
"mini-css-extract-plugin": "0.7.0",
"node-sass": "4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"sass-loader": "7.1.0",
"karma-webpack": "4.0.2",
"mini-css-extract-plugin": "0.8.0",
"node-sass": "4.13.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"sass-loader": "8.0.0",
"standard": "12.0.1",
"uglifyjs-webpack-plugin": "2.1.3",
"webpack": "4.33.0",
"webpack-cli": "3.3.3",
"webpack-dev-server": "3.7.1"
"terser-webpack-plugin": "2.2.1",
"webpack": "4.41.2",
"webpack-cli": "3.3.10",
"webpack-dev-server": "3.9.0"
},
"scripts": {
"test": "standard && karma start",
Expand Down
14 changes: 11 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const path = require('path')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')

module.exports = {
mode: 'development',
devtool: 'source-map',
entry: [
'./src/index.js'
],
Expand Down Expand Up @@ -71,8 +72,15 @@ module.exports = {
assetNameRegExp: /\.css$/g,
canPrint: false
}),
new UglifyJSPlugin({
sourceMap: true
new TerserPlugin({
cache: false,
parallel: true,
sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
mangle: true,
ie8: true,
safari10: true
}
})
]
}
Expand Down

0 comments on commit 1fff274

Please sign in to comment.