const webpack = require('webpack'); const path = require('path'); const BUILD_DIR = path.resolve(__dirname, 'src/react/public'); const APP_DIR = path.resolve(__dirname, 'src/react/js'); const config = { entry: APP_DIR + '/app.js', output: { path: BUILD_DIR, filename: 'bundle.js' }, module: { loaders: [ { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ } ] } }; module.exports = config;