Files
ecgsyn.js/ecgsyn-rs/site/webpack.config.js
2024-11-15 22:03:51 -06:00

35 lines
768 B
JavaScript

const CopyPlugin = require("copy-webpack-plugin");
const path = require("path");
module.exports = {
entry: "./src/index.ts",
module: {
rules: [
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.tsx?$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
},
experiments: {
asyncWebAssembly: true,
},
plugins: [
new CopyPlugin({
patterns: [{ from: "src/index.html" }],
}),
],
};