Skip to content

Instantly share code, notes, and snippets.

@jjfiv
Created June 20, 2016 14:44
Show Gist options
  • Select an option

  • Save jjfiv/4668776b95aa662700a2dd4021008d4f to your computer and use it in GitHub Desktop.

Select an option

Save jjfiv/4668776b95aa662700a2dd4021008d4f to your computer and use it in GitHub Desktop.
Webpack cfg I use with babel for react...
module.exports = {
context: __dirname + "/app",
entry: {
javascript: ["./app.js"],
html: ["./index.html", "./style.css"],
},
output: {
filename: "app.js",
path: __dirname + "/dist",
},
module: {
loaders: [
{
test: /\.js$/,
exclude: [/node_modules/, 'book.js'],
loaders: ["babel-loader"],
},
{
test: /\.html$/,
loaders: ["file?name=[name].[ext]"],
},
{ test: /\.css$/, loaders: ["file?name=[name].[ext]"]}
],
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment