Skip to content

Commit

Permalink
Update webpack.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlehn committed Sep 2, 2020
1 parent c8d5395 commit ba13a1c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module.exports = function(config) {
},

webpack: {
mode: 'development',
devtool: 'inline-source-map',
node: {
Buffer: false,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"nodejs-websocket": "^1.7.1",
"nyc": "^15.0.0",
"opts": "^1.2.7",
"webpack": "^3.11.0",
"webpack": "^4.41.6",
"webpack-cli": "^3.3.11",
"worker-loader": "^2.0.0"
},
"repository": {
Expand Down
5 changes: 4 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Copyright 2011-2016 Digital Bazaar, Inc.
*/
const path = require('path');
const webpack = require('webpack');

// build multiple outputs
module.exports = [];
Expand Down Expand Up @@ -79,6 +78,7 @@ outputs.forEach(info => {

// plain unoptimized unminified bundle
const bundle = Object.assign({}, common, {
mode: 'development',
output: {
path: path.join(__dirname, 'dist'),
filename: info.filenameBase + '.js',
Expand All @@ -95,6 +95,7 @@ outputs.forEach(info => {

// optimized and minified bundle
const minify = Object.assign({}, common, {
mode: 'production',
output: {
path: path.join(__dirname, 'dist'),
filename: info.filenameBase + '.min.js',
Expand All @@ -103,6 +104,7 @@ outputs.forEach(info => {
},
devtool: 'cheap-module-source-map',
plugins: [
/*
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
Expand All @@ -113,6 +115,7 @@ outputs.forEach(info => {
}
//beautify: true
})
*/
]
});
if(info.library === null) {
Expand Down

0 comments on commit ba13a1c

Please sign in to comment.