Skip to content

Commit b49b3ce

Browse files
committed
feat: use Webpack 4
1 parent b0dc58d commit b49b3ce

8 files changed

+33107
-27876
lines changed

dist/oidc-client.js

Lines changed: 19065 additions & 17179 deletions
Large diffs are not rendered by default.

dist/oidc-client.min.js

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ 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-
107
// entry points for both configs
118
var npmEntry ='./index.js';
129
var classicEntry = ['babel-polyfill', npmEntry];
@@ -15,36 +12,39 @@ var classicEntry = ['babel-polyfill', npmEntry];
1512
gulp.task('build-lib-sourcemap', ['jsrsasign'], function() {
1613
// run webpack
1714
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
15+
mode: 'development',
1816
entry: npmEntry,
1917
output: {
2018
filename:'oidc-client.js',
2119
libraryTarget:'umd'
2220
},
2321
plugins: [],
2422
devtool:'inline-source-map'
25-
})))
23+
}), webpack))
2624
.pipe(gulp.dest('lib/'));
2725
});
2826

2927
// npm compliant build without source-maps & minified
3028
gulp.task('build-lib-min', ['jsrsasign'], function() {
3129
// run webpack
3230
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
31+
mode: 'production',
3332
entry: npmEntry,
3433
output: {
3534
filename:'oidc-client.min.js',
3635
libraryTarget:'umd',
3736
},
38-
plugins: [uglifyPlugin],
37+
plugins: [],
3938
devtool: false
40-
})))
39+
}), webpack))
4140
.pipe(gulp.dest('lib/'));
4241
});
4342

4443
// classic build with sourcemaps
4544
gulp.task('build-dist-sourcemap', ['jsrsasign'], function() {
4645
// run webpack
4746
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
47+
mode: 'development',
4848
entry: classicEntry,
4949
output: {
5050
filename:'oidc-client.js',
@@ -53,23 +53,24 @@ gulp.task('build-dist-sourcemap', ['jsrsasign'], function() {
5353
},
5454
plugins: [],
5555
devtool:'inline-source-map'
56-
})))
56+
}), webpack))
5757
.pipe(gulp.dest('dist/'));
5858
});
5959

6060
// classic build without sourcemaps & minified
6161
gulp.task('build-dist-min', ['jsrsasign'], function() {
6262
// run webpack
6363
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
64+
mode: 'production',
6465
entry: classicEntry,
6566
output: {
6667
filename:'oidc-client.min.js',
6768
libraryTarget:'var',
6869
library:'Oidc'
6970
},
70-
plugins: [uglifyPlugin],
71+
plugins: [],
7172
devtool: false
72-
})))
73+
}), webpack))
7374
.pipe(gulp.dest('dist/'));
7475
});
7576

0 commit comments

Comments
 (0)