Created
December 18, 2015 15:04
-
-
Save Kanx/e769be42ac5cab22ddb7 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'; | |
const path = require('path'); | |
const webpack = require('webpack'); | |
module.exports = { | |
devtool: 'source-map', | |
context: path.resolve('src'), | |
entry: [ | |
'webpack-dev-server/client?http://0.0.0.0:8080', // WebpackDevServer host and port | |
'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors | |
'./index' | |
], | |
output: { | |
path: "/build", | |
filename: "bundle.js", | |
publicPath: '/assets' | |
}, | |
devServer: { | |
contentBase: './src' | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin() | |
], | |
module: { | |
loaders: [ | |
{ | |
test: /\.(js|es6|jsx)$/, | |
exclude: /node_modules/, | |
loader: 'react-hot!babel-loader' | |
}, | |
{ | |
test: /\.scss$/, | |
exclude: /node_modules/, | |
loader: 'style!css!sass' | |
}, | |
{ | |
test: /.ttf$/, | |
exclude: /node_modules/, | |
loader: 'url?limit=100000' | |
} | |
] | |
}, | |
resolve: { | |
extensions: ['', '.js', '.es6', '.jsx'] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment