Created
February 21, 2016 03:48
-
-
Save chuck0523/d79b72970382928b02d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// webpack.config.js | |
var path = require('path') | |
var webpack = require('webpack') | |
var HtmlWebpackPlugin = require('html-webpack-plugin') | |
module.exports = { | |
entry: ['./src/index'], | |
output: { | |
path: path.join(__dirname, 'dist'), | |
filename: 'bundle.js' | |
}, | |
plugins: [ | |
new webpack.optimize.UglifyJsPlugin({ | |
compressor: { | |
warnings: false, | |
}, | |
}), | |
new webpack.optimize.OccurenceOrderPlugin(), | |
new HtmlWebpackPlugin({ | |
template: './src/index.html' | |
}) | |
], | |
module: { | |
loaders: [{ | |
test: /\.css$/, | |
loaders: ['style', 'css'] | |
}] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment