Skip to content

Commit

Permalink
feat: prevent mangling of function names
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRouyer committed Jun 28, 2018
1 parent b49b3ce commit 34b5bdb
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 3,070 deletions.
24 changes: 12 additions & 12 deletions dist/oidc-client.min.js

Large diffs are not rendered by default.

23 changes: 21 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var concat = require('gulp-concat');
var webpackStream = require('webpack-stream');
var webpack = require('webpack');
var createWebpackConfig = require('./webpack.base');
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');

// entry points for both configs
var npmEntry ='./index.js';
Expand Down Expand Up @@ -35,7 +36,16 @@ gulp.task('build-lib-min', ['jsrsasign'], function() {
libraryTarget:'umd',
},
plugins: [],
devtool: false
devtool: false,
optimization: {
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
keep_fnames: true
}
})
]
}
}), webpack))
.pipe(gulp.dest('lib/'));
});
Expand Down Expand Up @@ -69,7 +79,16 @@ gulp.task('build-dist-min', ['jsrsasign'], function() {
library:'Oidc'
},
plugins: [],
devtool: false
devtool: false,
optimization: {
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
keep_fnames: true
}
})
]
}
}), webpack))
.pipe(gulp.dest('dist/'));
});
Expand Down
3,051 changes: 18 additions & 3,033 deletions lib/oidc-client.js

Large diffs are not rendered by default.

30 changes: 12 additions & 18 deletions lib/oidc-client.min.js

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"gulp-concat": "^2.6.1",
"mocha": "^2.4.5",
"open": "0.0.5",
"uglifyjs-webpack-plugin": "^1.2.7",
"webpack": "^4.12.2",
"webpack-stream": "^4.0.3"
},
Expand Down
3 changes: 2 additions & 1 deletion webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ var createWebpackConfig = function(options) {
]
},
// this is for the sourcemaps
devtool: options.devtool
devtool: options.devtool,
optimization: options.optimization
};
};

Expand Down

0 comments on commit 34b5bdb

Please sign in to comment.