Created
May 20, 2015 15:09
-
-
Save TN1ck/2571fe89aac13036d910 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
'use strict'; | |
var webpack = require('webpack'); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
devtool: 'eval', | |
entry: [ | |
'webpack-dev-server/client?http://localhost:3000', | |
'webpack/hot/only-dev-server', | |
'./scripts/index' | |
], | |
output: { | |
path: __dirname + '/build/', | |
filename: 'bundle.js', | |
publicPath: '/build/' | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin(), | |
new ExtractTextPlugin("[name].css") | |
], | |
resolve: { | |
extensions: ['', '.js', '.jsx', '.css', '.scss'] | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.jsx$/, loaders: [ | |
'react-hot', | |
'jsx?harmony', | |
'babel-loader', | |
], exclude: /node_modules/ }, | |
{ test: /\.js$/, loaders: [ | |
'react-hot', | |
'jsx?harmony', | |
'babel-loader', | |
], exclude: /node_modules/ }, | |
{ test: /\.css$/, loaders: [ | |
'style-loader', | |
'css-loader', | |
'autoprefixer-loader', | |
], exclude: /node_modules/ }, | |
{ | |
test: /\.less$/, | |
// loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader") | |
loader: "style!css!less" | |
}, | |
] | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment