Skip to content
This repository has been archived by the owner on Feb 1, 2018. It is now read-only.

Add minified version #30

Open
bennycode opened this issue Jan 28, 2017 · 2 comments
Open

Add minified version #30

bennycode opened this issue Jan 28, 2017 · 2 comments

Comments

@bennycode
Copy link
Contributor

    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false,
        screw_ie8: true,
        conditionals: true,
        unused: true,
        comparisons: true,
        sequences: true,
        dead_code: true,
        evaluate: true,
        if_return: true,
        join_vars: true
      },
      output: {
        comments: false
      },
    })
@bennycode
Copy link
Contributor Author

@bennycode
Copy link
Contributor Author

Another valid option:

var path = require('path');
var webpack = require('webpack');
var UnminifiedWebpackPlugin = require('unminified-webpack-plugin');

module.exports = {
    entry: {
        index: './src/index.js'
    },
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'library.min.js'
    },
    plugins: [
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false
            }
        }),
        new UnminifiedWebpackPlugin()
    ]
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant