Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save czbaker/b80a8963e736baeb7a22b0bfb99e1161 to your computer and use it in GitHub Desktop.

Select an option

Save czbaker/b80a8963e736baeb7a22b0bfb99e1161 to your computer and use it in GitHub Desktop.
import path from 'path'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import babel from 'babel-loader'
import webpack from 'webpack'
console.log("Loading development webpack configuration...")
module.exports = {
devtool: "sourcemap",
entry: [
'webpack-hot-middleware/client?reload=true',
'./client/index.js'
],
output: {
path: '/',
publicPath: '/',
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.css$/, exclude: /\.useable\.css$/, loader: "style!css" },
{ test: /\.useable\.css$/, loader: "style/useable!css" },
{
test: /\.jsx?$/,
exclude: /(node_modules)|(bower_components)/,
loader: 'babel',
query: {
presets: ['es2015', 'react']
}
}
]
},
plugins: [
new HtmlWebpackPlugin({
title: 'Perseus',
template: './client/index.html'
}),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment