Skip to content

Instantly share code, notes, and snippets.

@romanenko
Created August 4, 2015 13:02
Show Gist options
  • Save romanenko/f9f94db578d99fa44954 to your computer and use it in GitHub Desktop.
Save romanenko/f9f94db578d99fa44954 to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://0.0.0.0:3000',
'webpack/hot/only-dev-server',
'./app/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
resolve: {
extensions: ['', '.js', '.jsx'],
modulesDirectories: ["vendor", "node_modules"]
},
module: {
loaders: [
{
test: /\.jsx?$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'app')
},
{
test: /\.scss$/,
loader: "style!css!autoprefixer!sass?outputStyle=expanded&" +
"includePaths[]=" +
(path.resolve(__dirname, "./vendor")) + "&" +
"includePaths[]=" +
(path.resolve(__dirname, "./bower_components")) + "&" +
"includePaths[]=" +
(path.resolve(__dirname, "./node_modules"))
},
{
test: /\.(png|gif|woff|woff2|eot|ttf|svg)$/,
loader: 'url-loader?limit=100000'
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment