Skip to content

Commit

Permalink
chore(package): update webpack to ^2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nacardin authored and bitjson committed Apr 20, 2017
1 parent 1a4843a commit fcd46ab
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"url": "https://github.com/bitpay/cordova-plugin-qrscanner/issues"
},
"homepage": "https://github.com/bitpay/cordova-plugin-qrscanner",
"main":"dist/cordova-plugin-qrscanner-lib.min.js",
"main": "dist/cordova-plugin-qrscanner-lib.min.js",
"dependencies": {
"qrcode-reader": "^0.2.2",
"webrtc-adapter": "^3.1.4"
Expand All @@ -70,7 +70,7 @@
"raw-loader": "^0.5.1",
"trash-cli": "^1.3.0",
"validate-commit-msg": "^2.6.1",
"webpack": "^2.1.0-beta.22"
"webpack": "^2.4.1"
},
"config": {
"commitizen": {
Expand Down
14 changes: 5 additions & 9 deletions webpack.cordova.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
const webpack = require('webpack');
const path = require('path');

module.exports = {
entry: {
plugin: './src/browser/src/cordova-plugin.js',
www: './src/common/src/cordova-www.js'
plugin: path.join(__dirname, './src/browser/src/cordova-plugin.js'),
www: path.join(__dirname, './src/common/src/cordova-www.js')
},
output: {
path: './dist',
path: path.join(__dirname, './dist'),
filename: '[name].min.js'
},
externals: {
"webpack/cordova": "cordova",
"webpack/cordova/require": "cordovaRequire",
"webpack/cordova/exports": "cordovaExports",
"webpack/cordova/module": "cordovaModule"
},
plugins: [
// new webpack.optimize.UglifyJsPlugin({
// comments: false
// })
]
}
}
14 changes: 5 additions & 9 deletions webpack.library.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
const webpack = require('webpack');
const path = require('path');

module.exports = {
devtool: 'source-map',
entry: {
library: './src/browser/src/library.js'
worker: path.join(__dirname, './src/browser/src/worker.js'),
},
output: {
path: './dist',
filename: 'cordova-plugin-qrscanner-lib.min.js',
library: 'QRScanner',
libraryTarget: 'umd',
umdNamedDefine: true
path: path.join(__dirname, './src/browser'),
filename: 'worker.min.js'
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
comments: false,
sourceMap: true
comments: false
})
]
}
5 changes: 3 additions & 2 deletions webpack.prepack.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const webpack = require('webpack');
const path = require('path');

module.exports = {
entry: {
worker: './src/browser/src/worker.js',
worker: path.join(__dirname, './src/browser/src/worker.js'),
},
output: {
path: './src/browser',
path: path.join(__dirname, './src/browser'),
filename: 'worker.min.js'
},
plugins: [
Expand Down

0 comments on commit fcd46ab

Please sign in to comment.