Skip to content

Instantly share code, notes, and snippets.

@johnstew
Created February 26, 2016 21:57
Show Gist options
  • Save johnstew/7d02c336109d4dbdefc7 to your computer and use it in GitHub Desktop.
Save johnstew/7d02c336109d4dbdefc7 to your computer and use it in GitHub Desktop.
Webpack Config
var webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: {
main: [
'./src/app.js',
'webpack-dev-server/client?http://localhost:8080'
]
},
output: {
path: './public/',
publicPath: 'http://localhost:8080/',
filename: 'app.bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react']
},
exclude: /node_modules/
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
}
]
},
plugins: [
new webpack.ProvidePlugin({
'Promise': 'es6-promise',
'fetch': 'isomorphic-fetch'
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment