ybbond-reason

My old site written in ReasonReact
Log | Files | Refs | README | LICENSE | CC-LICENSE

webpack.config.js (595B)


      1 const path = require('path');
      2 const HtmlWebpackPlugin = require('html-webpack-plugin');
      3 const outputDir = path.join(__dirname, 'build/');
      4 
      5 const isProd = process.env.NODE_ENV === 'production';
      6 
      7 module.exports = {
      8   entry: './src/Index.bs.js',
      9   mode: isProd ? 'production' : 'development',
     10   output: {
     11     path: outputDir,
     12     filename: 'Index.js'
     13   },
     14   plugins: [
     15     new HtmlWebpackPlugin({
     16       template: 'src/index.html',
     17       inject: false
     18     })
     19   ],
     20   devServer: {
     21     compress: true,
     22     contentBase: outputDir,
     23     port: process.env.PORT || 8000,
     24     historyApiFallback: true
     25   }
     26 };