Skip to content

Commit 2bfa861

Browse files
committed
update to latest webpack
1 parent ef18e0f commit 2bfa861

3 files changed

Lines changed: 11 additions & 18 deletions

File tree

‎gulpfile.js‎

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,13 @@ var webpackStream = require('webpack-stream');
44
var webpack = require('webpack');
55
var createWebpackConfig = require('./webpack.base');
66

7+
var Uglify = require('uglifyjs-webpack-plugin');
8+
var uglifyPlugin = new Uglify();
9+
710
// entry points for both configs
811
var npmEntry ='./index.js';
912
var classicEntry = ['babel-polyfill', npmEntry];
1013

11-
// uglify plugin for minification
12-
var uglifyPlugins = [
13-
new webpack.optimize.UglifyJsPlugin({
14-
compress: {
15-
warnings: false,
16-
screw_ie8: true,
17-
},
18-
})
19-
];
20-
2114
// npm compliant build with source-maps
2215
gulp.task('build-lib-sourcemap', ['jsrsasign'], function() {
2316
// run webpack
@@ -42,8 +35,8 @@ gulp.task('build-lib-min', ['jsrsasign'], function() {
4235
filename:'oidc-client.min.js',
4336
libraryTarget:'umd',
4437
},
45-
plugins: uglifyPlugins,
46-
devtool: null
38+
plugins: [uglifyPlugin],
39+
devtool: false
4740
})))
4841
.pipe(gulp.dest('lib/'));
4942
});
@@ -74,8 +67,8 @@ gulp.task('build-dist-min', ['jsrsasign'], function() {
7467
libraryTarget:'var',
7568
library:'Oidc'
7669
},
77-
plugins: uglifyPlugins,
78-
devtool: null
70+
plugins: [uglifyPlugin],
71+
devtool: false
7972
})))
8073
.pipe(gulp.dest('dist/'));
8174
});

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"homepage": "https://github.com/IdentityModel/oidc-client-js",
3333
"devDependencies": {
3434
"babel-core": "^6.7.2",
35-
"babel-loader": "^6.2.4",
35+
"babel-loader": "^7.1.4",
3636
"babel-plugin-add-module-exports": "^0.2.1",
3737
"babel-plugin-transform-es2015-classes": "^6.7.7",
3838
"babel-polyfill": "^6.9.1",
@@ -44,8 +44,8 @@
4444
"gulp-concat": "^2.6.1",
4545
"mocha": "^2.4.5",
4646
"open": "0.0.5",
47-
"webpack": "^1.12.14",
48-
"webpack-stream": "^3.2.0"
47+
"webpack": "^4.8.3",
48+
"webpack-stream": "^4.0.3"
4949
},
5050
"dependencies": {
5151
"jsrsasign": "^8.0.12"

‎webpack.base.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var createWebpackConfig = function(options) {
1212
loaders: [
1313
{
1414
test: /.js$/,
15-
loaders: ['babel'],
15+
loaders: ['babel-loader'],
1616
exclude: /node_modules/,
1717
include: __dirname
1818
}

0 commit comments

Comments
 (0)