Skip to content

Commit c8d2b02

Browse files
committed
Updated build config to handle YAML as Text
1 parent b403fd3 commit c8d2b02

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

esbuild.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,8 @@ esbuild
5151
sourcemap: prod ? false : "inline",
5252
treeShaking: true,
5353
outfile: "main.js",
54+
loader: {
55+
".yaml": "text", // Added to handle handle .yaml files as text
56+
},
5457
})
5558
.catch(() => process.exit(1));

src/declarations.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module "*.yaml" {
2+
const content: string;
3+
export default content;
4+
}

0 commit comments

Comments
 (0)