Skip to content

Commit d924d3e

Browse files
committed
build: silence import.meta warnings in CJS build
1 parent 32c52a1 commit d924d3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tsup.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ export default defineConfig({
3636
"https",
3737
"url",
3838
],
39-
esbuildOptions(options) {
39+
esbuildOptions(options, context) {
4040
options.banner = {
4141
js: "// opencode-codebase-index - Semantic codebase search for OpenCode",
4242
};
43+
if (context.format === "cjs") {
44+
options.logOverride = {
45+
"empty-import-meta": "silent",
46+
};
47+
}
4348
},
4449
});

0 commit comments

Comments
 (0)