35 lines
656 B
JavaScript
35 lines
656 B
JavaScript
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
const path = require("path");
|
|
|
|
module.exports = {
|
|
entry: "./src/main.tsx",
|
|
output: {
|
|
path: path.resolve(__dirname, "build"),
|
|
filename: "index.js",
|
|
},
|
|
resolve: {
|
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
experiments: {
|
|
asyncWebAssembly: true,
|
|
},
|
|
mode: "development",
|
|
plugins: [
|
|
new CopyWebpackPlugin({
|
|
patterns: [
|
|
{ from: "index.html" },
|
|
{ from: "public", to: "public" }
|
|
],
|
|
}),
|
|
],
|
|
};
|