1 const path
= require('path');
2 const webpack
= require('webpack');
3 const HtmlWebpackPlugin
= require('html-webpack-plugin');
6 entry
: './src/index.ts',
7 devtool
: 'inline-source-map',
11 disableHostCheck
: true,
14 { from: /^_\/.*$/, to
: '/index.html' }
24 exclude
: /node_modules/,
29 extensions
: [ '.tsx', '.ts', '.js' ],
32 filename
: '[name].[contenthash].js',
33 path
: path
.resolve(__dirname
, 'dist'),
37 new HtmlWebpackPlugin(
39 template
: './dist/index.html'
42 new webpack
.ProvidePlugin({
45 new webpack
.EnvironmentPlugin(['API_URL', 'DEBUG_MODE'])