Created
January 12, 2015 10:38
-
-
Save fellz/b2cc0de81c7b1f5bf442 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
/* | |
* Webpack development server configuration | |
* | |
* This file is set up for serving the webpak-dev-server, which will watch for changes and recompile as required if | |
* the subfolder /webpack-dev-server/ is visited. Visiting the root will not automatically reload. | |
*/ | |
'use strict'; | |
var webpack = require('webpack'); | |
module.exports = { | |
output: { | |
filename: 'main.js', | |
publicPath: '/assets/' | |
}, | |
cache: true, | |
debug: true, | |
devtool: false, | |
entry: [ | |
'webpack/hot/only-dev-server', | |
'./src/scripts/components/main.js' | |
], | |
stats: { | |
colors: true, | |
reasons: true | |
}, | |
resolve: { | |
extensions: ['', '.js'] | |
}, | |
module: { | |
preLoaders: [{ | |
test: '\\.js$', | |
exclude: 'node_modules', | |
loader: 'jshint' | |
}], | |
loaders: [{ | |
test: /\.js$/, | |
loader: 'react-hot!jsx-loader?harmony' | |
}, { | |
test: /\.sass/, | |
loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded' | |
}, { | |
test: /\.css$/, | |
loader: 'style-loader!css-loader' | |
}, { | |
test: /\.(png|jpg)$/, | |
loader: 'url-loader?limit=8192' | |
}] | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin() | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment