gulpfile.js
function build_lib_min(){
    // run webpack
  return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
    mode: 'production',
    entry: npmEntry,
    output: {
        filename:'oidc-client.min.js',
        libraryTarget:'umd',
        // Workaround for https://github.com/webpack/webpack/issues/6642
        globalObject: 'this'
    },
    plugins: [],
    devtool: false,
    optimization: {
      minimizer: [
        new UglifyJsPlugin({
          uglifyOptions: {
            keep_fnames: true
          }
        })
      ]
    }
  }), webpack))
  .pipe(gulp.dest('lib/'));
}
function build_lib_min(){
    // run webpack
  return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
    mode: 'production',
    entry: npmEntry,
    output: {
        filename:'oidc-client.min.js',
        libraryTarget:'umd',
        // Workaround for https://github.com/webpack/webpack/issues/6642
        globalObject: 'this'
    },
    plugins: [],
    devtool: false,
    optimization: {
      minimizer: [
        new UglifyJsPlugin({
          uglifyOptions: {
            keep_fnames: true
          }
        })
      ]
    }
  }), webpack))
  .pipe(gulp.dest('lib/'));
}
function build_lib_min ( ) { // run webpack return gulp . src ( 'index.js' ) . pipe ( webpackStream ( createWebpackConfig ( { mode : 'production' , entry : npmEntry , output : { filename : 'oidc-client.min.js' , libraryTarget : 'umd' , // Workaround for https://github.com/webpack/webpack/issues/6642 globalObject : 'this' } , plugins : [ ] , devtool : false , optimization : { minimizer : [ new UglifyJsPlugin ( { uglifyOptions : { keep_fnames : true } } ) ] } } ) , webpack ) ) . pipe ( gulp . dest ( 'lib/' ) ) ; }
npm compliant build without source-maps & minified
npm compliant build without source - maps & minified