UNPKG

generator-wallaby-webpack-react

Version:

Yeoman generator for wallabyjs, webpack, react, hot reloading, jest and babel.

40 lines (38 loc) 775 B
var path = require('path'); var webpack = require('webpack'); var CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { devtool: 'source-map', entry: [ './src/App.jsx' ], output: { path: path.join(__dirname, 'dist'), filename: '[name].bundle.js' }, plugins: [ new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production') } }), new webpack.optimize.UglifyJsPlugin({ compressor: { warnings: false } }), new CopyWebpackPlugin([ { from: 'public' } ]) ], module: { rules: [{ test: /\.jsx?$/, loader: 'babel-loader', include: path.join(__dirname, 'src'), }] }, resolve: { extensions: ['.js', '.jsx'] } };