Skip to content

Commit

Permalink
build(webpack): fix library build
Browse files Browse the repository at this point in the history
  • Loading branch information
bitjson committed May 17, 2018
1 parent df092bb commit 3acb339
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"raw-loader": "^0.5.1",
"trash-cli": "^1.3.0",
"validate-commit-msg": "^2.6.1",
"webpack": "^2.4.1"
"webpack": "^2.7.0"
},
"config": {
"commitizen": {
Expand Down
15 changes: 10 additions & 5 deletions webpack.library.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ const webpack = require('webpack');
const path = require('path');

module.exports = {
devtool: 'source-map',
entry: {
worker: path.join(__dirname, './src/browser/src/worker.js'),
worker: path.join(__dirname, './src/browser/src/library.js')
},
output: {
path: path.join(__dirname, './src/browser'),
filename: 'worker.min.js'
path: path.join(__dirname, './dist'),
filename: 'cordova-plugin-qrscanner-lib.min.js',
library: 'QRScanner',
libraryTarget: 'umd',
umdNamedDefine: true
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
comments: false
comments: false,
sourceMap: true
})
]
}
};

0 comments on commit 3acb339

Please sign in to comment.