Skip to content

Instantly share code, notes, and snippets.

@aindong
Last active December 10, 2015 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aindong/e09983ae43306e7a620d to your computer and use it in GitHub Desktop.
Save aindong/e09983ae43306e7a620d to your computer and use it in GitHub Desktop.
multiple entry with babel loader webpack config
var path = require("path");
module.exports = {
entry: {
LoginBundle: "./public/src/login/index.js"
},
output: {
path: path.join(__dirname, "./"),
filename: "[name].js"
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
// https://github.com/babel/babel-loader#options
cacheDirectory: true,
presets: ['es2015', 'stage-0', 'react']
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment