Skip to content

Instantly share code, notes, and snippets.

@z81
Last active December 22, 2015 17:39
Show Gist options
  • Save z81/a52a072c8e3264a07f2f to your computer and use it in GitHub Desktop.
Save z81/a52a072c8e3264a07f2f to your computer and use it in GitHub Desktop.
var path = require('path');
var getBabelRelayPlugin = require('babel-relay-plugin');
var schema = require('./schema.json');
var realyBabelPlugin = getBabelRelayPlugin(schema.data);
module.exports = {
entry: {
app: [
path.resolve(__dirname, 'src/main.js')
]
},
output: {
path: path.resolve(__dirname, 'public'),
filename: 'js/bundle.js',
},
plugins: [
],
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['react', 'es2015'],
plugins: ['./scripts/babelRelayPlugin', "transform-runtime", "transform-class-properties", "transform-es2015-template-literals"],
}
},
{
test: /\.less$/,
loader: "style!css!less"
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment