const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { mode: 'development', entry: './src/index.ts', devtool: 'inline-source-map', experiments: { asyncWebAssembly: true, }, module: { rules: [ { test: /\.tsx?$/, use: 'ts-loader', exclude: /node_modules/, }, { test: /\.wasm$/, type: 'webassembly/async', } ], }, resolve: { extensions: ['.tsx', '.ts', '.js'], }, output: { filename: 'index.js', path: path.resolve(__dirname, 'dist'), }, plugins: [ new HtmlWebpackPlugin({ template: 'src/index.html' }), new CopyWebpackPlugin({ patterns: [ { from: 'src/assets', to: './assets' }, { from: 'src/style', to: './style' } ], }), ], devServer: { static: './dist', }, };