Skip to content

Instantly share code, notes, and snippets.

@dpickett
Last active October 22, 2016 16:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dpickett/3691e1214202beddda9596a9d1f4289f to your computer and use it in GitHub Desktop.
Save dpickett/3691e1214202beddda9596a9d1f4289f to your computer and use it in GitHub Desktop.
require('babel-loader')
var webpack = require('webpack');
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
path: './src/main.js'
},
output: {
path: './build',
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
},
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
}
]
},
plugins: [
new CopyWebpackPlugin([{from: './src/index.html', to: '/index.html'}]),
new webpack.HotModuleReplacementPlugin()
],
devtool: 'eval-source-map',
devServer: {
contentBase: './build',
inline: true,
hot: true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment