{ rules: [ // write our loader settings here ] }, entry: { bundle: './src/index' }, output: { path: path.join(__dirname, 'public'), filename: '[name].js' }, devServer: { historyApiFallback: true, contentBase: path.join(__dirname, 'public'), port: 8080 }, mode: process.env.NODE_ENV || 'development' } if (process.env.NODE_ENV !== 'production') { Object.assign(options, { devtool: 'inline-source-map' }) } module.exports = options