Skip to content

Instantly share code, notes, and snippets.

@denisftw
Created January 13, 2016 15:05
Show Gist options
  • Save denisftw/9a347c7363a631842f4f to your computer and use it in GitHub Desktop.
Save denisftw/9a347c7363a631842f4f to your computer and use it in GitHub Desktop.
Webpack staring point (React, Babel, Fetch)
var webpack = require('webpack');
module.exports = {
entry: './ui/entry.js',
output: { path: __dirname + '/public/compiled', filename: 'bundle.js' },
module: {
loaders: [
{ test: /\.jsx?$/, loader: 'babel-loader', include: /ui/, query: { presets: ['es2015', 'react'] } }
]
},
plugins: [
new webpack.ProvidePlugin({
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment