Skip to content

Instantly share code, notes, and snippets.

@trodrigues
Created February 2, 2016 15:53
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 trodrigues/8aba8273198d63cbdd4a to your computer and use it in GitHub Desktop.
Save trodrigues/8aba8273198d63cbdd4a to your computer and use it in GitHub Desktop.
// 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