Created
March 19, 2015 20:31
-
-
Save JosephShering/cc83a2d10642775cda49 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