Skip to content

Commit 3acb339

Browse files
committed
build(webpack): fix library build
1 parent df092bb commit 3acb339

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"raw-loader": "^0.5.1",
7171
"trash-cli": "^1.3.0",
7272
"validate-commit-msg": "^2.6.1",
73-
"webpack": "^2.4.1"
73+
"webpack": "^2.7.0"
7474
},
7575
"config": {
7676
"commitizen": {

webpack.library.config.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@ const webpack = require('webpack');
22
const path = require('path');
33

44
module.exports = {
5+
devtool: 'source-map',
56
entry: {
6-
worker: path.join(__dirname, './src/browser/src/worker.js'),
7+
worker: path.join(__dirname, './src/browser/src/library.js')
78
},
89
output: {
9-
path: path.join(__dirname, './src/browser'),
10-
filename: 'worker.min.js'
10+
path: path.join(__dirname, './dist'),
11+
filename: 'cordova-plugin-qrscanner-lib.min.js',
12+
library: 'QRScanner',
13+
libraryTarget: 'umd',
14+
umdNamedDefine: true
1115
},
1216
plugins: [
1317
new webpack.optimize.UglifyJsPlugin({
14-
comments: false
18+
comments: false,
19+
sourceMap: true
1520
})
1621
]
17-
}
22+
};

0 commit comments

Comments
 (0)