Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created March 14, 2017 02:25
Show Gist options
  • Save miguelmota/8de70f5860e84e1fbc934451750efcc3 to your computer and use it in GitHub Desktop.
Save miguelmota/8de70f5860e84e1fbc934451750efcc3 to your computer and use it in GitHub Desktop.
Cycle.js webpack + babel config
{
"presets": [
"es2015"
],
"plugins": [
"syntax-jsx",
["transform-react-jsx", {"pragma": "html"}],
"transform-function-bind",
["babel-root-import", {
"rootPathSuffix": "client/"
}],
]
}
'use strict'
module.exports = {
entry: './client/index.js',
output: {
filename: './client/build/app.dist.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
}
]
}
}
@jamessawyer
Copy link

Note that 'babel-root-import' was renamed to 'babel-plugin-root-import'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment