Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
production webpack config
var webpack = require('webpack');
var path = require('path');
var ManifestPlugin = require('webpack-manifest-plugin')
function root(fragment){
return path.join(__dirname, "client", fragment);
module.exports = {
devtool: 'source-map',
context: __dirname,
entry: [
output: {
path: 'public/assets',
filename: '[name].[chunkhash].js'
plugins: [
new ManifestPlugin()
module: {
loaders: [
{test: /\.js$/, loader: 'uglify'},
{test: /\.coffee$/, loader: "uglify!coffee-loader"},
{test: /\.css$/, loader: "style!css"},
{test: /\.scss$/, loader: "style!css?minimize&-autoprefixer!autoprefixer!sass"},
{test: /\.less$/, loader: "style!css?minimize&-autoprefixer!autoprefixer!less"},
{test: /\.(png|gif|eot|woff2|woff|ttf|svg)$/, loader: "url"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.