Skip to content

Instantly share code, notes, and snippets.

@ericclemmons
Created November 22, 2016 02:55
Show Gist options
  • Save ericclemmons/cf7c2a2139b7193d0d91cf958d3b2257 to your computer and use it in GitHub Desktop.
Save ericclemmons/cf7c2a2139b7193d0d91cf958d3b2257 to your computer and use it in GitHub Desktop.
Minimal webpack + babel + Node v6 + Chrome
var webpack = require("webpack");
module.exports = {
module: {
loaders: [
{
exclude: /node_modules/,
loader: "babel-loader",
query: {
cacheDirectory: true,
plugins: ["react-html-attrs"],
presets: ["react-app"]
},
test: /\.js$/,
}
]
},
plugins: [
// Functional components should be lib-agnostic
new webpack.ProvidePlugin({ React: "react" }),
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment