Skip to content

Instantly share code, notes, and snippets.

@cgrinaldi
Created November 21, 2015 18:26
Show Gist options
  • Save cgrinaldi/fbccc824d5516a4342b2 to your computer and use it in GitHub Desktop.
Save cgrinaldi/fbccc824d5516a4342b2 to your computer and use it in GitHub Desktop.
A basic Webpack configuration
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'babel-polyfill',
'webpack-dev-server/client?http://localhost:8080',
'./src/js/app',
'./src/style.scss'
],
output: {
publicPath: '/',
filename: 'bundle.js'
},
devtool: 'source-map',
devServer: {
contentBase: './src'
},
module: {
loaders: [
{
test: /\.jsx?$/,
include: path.join(__dirname, 'src'),
loader: 'babel-loader',
query: {
presets: ['es2015','react']
}
},
{
test: /\.scss$/,
loader: 'style!css!sass'
}
]
},
debug: true
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment