Skip to content

Instantly share code, notes, and snippets.

@wenbochang
Created June 29, 2016 20:14
Show Gist options
  • Select an option

  • Save wenbochang/b1561d4a4c20faa4f854ab28112ce8c5 to your computer and use it in GitHub Desktop.

Select an option

Save wenbochang/b1561d4a4c20faa4f854ab28112ce8c5 to your computer and use it in GitHub Desktop.

Revisions

  1. wenbochang created this gist Jun 29, 2016.
    26 changes: 26 additions & 0 deletions webpack.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    var path = require('path');
    var webpack = require('webpack');

    module.exports = {
    entry: './src/main.js',
    output: {
    path: path.join(__dirname, 'build'),
    filename: 'bundle.js'
    },
    devtool: 'cheap-module-source-map',
    module: {
    loaders: [
    {
    test: path.join(__dirname, 'src'),
    loader: 'babel-loader'
    }
    ]
    },
    plugins: [
    new webpack.optimize.UglifyJsPlugin({
    compress: {
    warnings: false
    }
    })
    ]
    };