waku-lab/examples/buddybook/webpack.config.js

35 lines
656 B
JavaScript
Raw Normal View History

2024-10-25 00:11:04 +00:00
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" }
],
}),
],
};