forked from adi-g15/leetcode-progress-tracker
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.cjs
More file actions
41 lines (39 loc) · 867 Bytes
/
webpack.config.cjs
File metadata and controls
41 lines (39 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// const HTMLWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require("path");
// @adi-g
// https://lannonbr.com/blog/2020-02-17-wasm-pack-webpack-plugin
// https://dev.to/lokesh007/webassembly-with-rust-and-react-using-create-react-app-67
module.exports = {
entry: "./index.ts",
module: {
rules: [
{
test: /\.ts?$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".ts",".js"],
},
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist"),
},
mode: "development",
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: "index.html",
},
{
from: "global.css",
},
],
}),
],
};
// ex: shiftwidth=2 expandtab: