Add Typescript to build (#207)

This commit is contained in:
sua yoo
2023-09-05 17:24:08 -07:00
parent 8e715cdf54
commit b7406189bb
6 changed files with 61 additions and 6 deletions
+12 -1
View File
@@ -99,7 +99,10 @@ const browserConfig = (/*env, argv*/) => {
return {
target: "web",
mode: "production",
resolve: {fallback: { "crypto": false }},
resolve: {
fallback: { "crypto": false },
extensions: [".ts", ".js"],
},
entry,
optimization,
@@ -150,6 +153,14 @@ const browserConfig = (/*env, argv*/) => {
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
include: path.resolve(__dirname, "src"),
options: {
onlyCompileBundledFiles: true,
},
},
{
test: /\.svg$/,
use: ["svg-inline-loader"],