const HtmlWebpackPlugin = require("html-webpack-plugin"); const path = require("path"); module.exports = { entry: "./src/index.tsx", output: { path: path.resolve(__dirname, "dist"), filename: "bundle.[hash].js", }, devServer: { compress: true, port: 8080, hot: true, static: "./dist", historyApiFallback: true, open: true, }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: "babel-loader", }, }, { test: /\.tsx?$/, exclude: /node_modules/, use: {loader: 'ts-loader'}, }, ], }, plugins: [ new HtmlWebpackPlugin({ template: __dirname + "/public/index.html", filename: "index.html", }), ], mode: "development", devtool: "inline-source-map", experiments: { asyncWebAssembly: true }, resolve: { extensions: ['.tsx', '.ts', '.js'], }, };