From cfb0d9d703b613b3ad35ff8c7b578ca62ce5295d Mon Sep 17 00:00:00 2001 From: Mayank Kumar Chaudhari Date: Wed, 1 May 2024 15:27:19 +0530 Subject: [PATCH] Fix - ignore Gudes.ts from tests and builds --- lib/r18gs/tsup.config.ts | 2 ++ lib/r18gs/vitest.config.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/r18gs/tsup.config.ts b/lib/r18gs/tsup.config.ts index 7eca4d05..ba544fb6 100644 --- a/lib/r18gs/tsup.config.ts +++ b/lib/r18gs/tsup.config.ts @@ -12,6 +12,8 @@ export default defineConfig(options => ({ { name: "improve-minify", setup(build) { + build.onLoad({ filter: /Guides.ts/ }, () => ({ contents: " ", loader: "ts" })); + build.onLoad({ filter: /utils.ts/ }, args => { let contents = fs.readFileSync(args.path, "utf8"); const lines = contents.split("\n"); diff --git a/lib/r18gs/vitest.config.ts b/lib/r18gs/vitest.config.ts index 9b0a01dc..2d58bcf9 100644 --- a/lib/r18gs/vitest.config.ts +++ b/lib/r18gs/vitest.config.ts @@ -11,6 +11,7 @@ export default defineConfig({ setupFiles: [], coverage: { include: ["src/**"], + exclude: ["src/Guides.ts"], reporter: ["text", "json", "clover", "html"], }, },