Last active
December 10, 2015 12:12
-
-
Save aindong/e09983ae43306e7a620d to your computer and use it in GitHub Desktop.
multiple entry with babel loader webpack config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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