UNPKG

@kabbi/react-redux-form

Version:
44 lines (35 loc) 974 B
/*eslint-disable no-var */ var fs = require('fs') var path = require('path') var webpack = require('webpack') module.exports = { devtool: 'inline-source-map', entry: fs.readdirSync(__dirname).reduce(function (entries, dir) { if (fs.statSync(path.join(__dirname, dir)).isDirectory()) entries[dir] = path.join(__dirname, dir, 'app.js') return entries }, {}), output: { path: __dirname + '/__build__', filename: '[name].js', chunkFilename: '[id].chunk.js', publicPath: '/__build__/' }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel' }, { test: /\.css$/, loader: 'css' }, ] }, resolve: { alias: { 'react-redux-form': path.join(__dirname, '..', 'src') } }, plugins: [ new webpack.optimize.CommonsChunkPlugin('shared.js'), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development') }) ] };