Created
February 2, 2016 15:53
-
-
Save trodrigues/8aba8273198d63cbdd4a to your computer and use it in GitHub Desktop.
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
// webpack.config.js | |
module.exports = { | |
entry: { | |
main: [ | |
'./bootstrap.js' | |
] | |
}, | |
output: { | |
path: __dirname, | |
filename: '[name].bundle.js' | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js?$/, | |
exclude: /(node_modules|bootstrap.js)/, | |
loader: 'babel' | |
} | |
] | |
} | |
}; | |
// bootstrap.js (plain ES5, just requires which get resolved by webpack | |
require('babel-runtime/core-js/promise').default = require('bluebird'); | |
require('./app') | |
// app.js (ES6, gets transformed by babel) | |
export default function request(){ | |
return new Promise(...) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment