35 lines
768 B
JavaScript
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" }],
|
|
}),
|
|
],
|
|
};
|