Created
January 27, 2016 14:36
-
-
Save boo1ean/a0408e646d9624e6bd78 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
devtool: 'eval', | |
context: path.join(__dirname, '../frontend'), | |
entry: [ | |
path.join(__dirname, '../frontend'), | |
'webpack-dev-server/client?http://localhost:3000', | |
'webpack/hot/only-dev-server', | |
], | |
output: { | |
path: path.join(__dirname, '../assets/dist'), | |
publicPath: '/dist/', | |
filename: 'bundle.js', | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin(), | |
new webpack.optimize.DedupePlugin(), | |
new webpack.optimize.OccurenceOrderPlugin(), | |
], | |
module: { | |
loaders: [ | |
{ test: /\.js$/, loader: 'react-hot!babel?presets[]=react&presets[]=es2015', exclude: /node_modules/ }, | |
{ test: /\.eot$/, loader: "file-loader" }, | |
{ test: /\.woff2?$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" }, | |
{ test: /\.ttf$/, loader: "url-loader?limit=10000&mimetype=application/octet-stream" }, | |
{ test: /\.svg$/, loader: "url-loader?limit=10000&mimetype=image/svg+xml" }, | |
{ test: /(\.scss|\.css)$/, loader: 'style!css?modules&importLoaders=1!postcss!sass' }] | |
}, | |
resolve: { | |
extensions: ['', '.js', '.jsx', '.json', '.scss'], | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment