Forked from JosephShering/gist:cc83a2d10642775cda49
Last active
August 29, 2015 14:17
-
-
Save shawnsandy/dcd9e4c01d8bf06cdc3d 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
var webpack = require('webpack'); | |
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js'); | |
module.exports = { | |
entry: { | |
Alerts: './webroot/js/src/alerts.js' | |
}, | |
output: { | |
path: './webroot/js/build/', | |
filename: '[name].js', | |
publicPath: './webroot/js/src/' | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.js$/, loader: 'jsx-loader?harmony' }, | |
{ test: /\.less$/, loader: 'style-loader!css-loader!less-loader'}, | |
{ test: /\.css$/, loader: 'style-loader!css-loader'}, | |
{test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'} | |
] | |
}, | |
resolve: { | |
extensions: ['', '.js', '.json', '.jsx'] | |
}, | |
plugins: [commonsPlugin] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment