const path = require("path"); const HtmlWebPackPlugin = require("html-webpack-plugin"); const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); module.exports = { mode: "development", entry: "./src/index.tsx", devtool: "eval-cheap-source-map", output: { filename: "main.js", path: path.resolve(__dirname, "build"), }, devServer: { static: { directory: path.join(__dirname, "build"), }, allowedHosts: ['.csb.app'], port: 3000, }, module: { rules: [ { test: /\.(ts|tsx)$/, use: "ts-loader", exclude: /node_modules/, }, { test: /\.css$/i, use: ["style-loader", "css-loader"], }, ], }, resolve: { extensions: [".tsx", ".ts", ".js"], plugins: [new TsconfigPathsPlugin()], }, plugins: [ new HtmlWebPackPlugin({ template: path.resolve(__dirname, "../src/index.html"), }), ], };