Skip to content

Commit fe70c68

Browse files
committed
ci
1 parent e90c9ba commit fe70c68

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

vite.main.config.mts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { copyFileSync, mkdirSync } from "node:fs";
2+
import { join } from "node:path";
13
import { defineConfig, type Plugin } from "vite";
2-
import { copyFileSync, mkdirSync } from "fs";
3-
import { join } from "path";
44

55
/**
66
* Custom Vite plugin to fix circular __filename references in bundled ESM packages.
@@ -38,8 +38,14 @@ function copyAgentTemplates(): Plugin {
3838
return {
3939
name: "copy-agent-templates",
4040
writeBundle() {
41-
const templateSrc = join(__dirname, "node_modules/@posthog/agent/dist/templates/plan-template.md");
42-
const templateDest = join(__dirname, ".vite/build/templates/plan-template.md");
41+
const templateSrc = join(
42+
__dirname,
43+
"node_modules/@posthog/agent/dist/templates/plan-template.md",
44+
);
45+
const templateDest = join(
46+
__dirname,
47+
".vite/build/templates/plan-template.md",
48+
);
4349

4450
mkdirSync(join(__dirname, ".vite/build/templates"), { recursive: true });
4551
copyFileSync(templateSrc, templateDest);

0 commit comments

Comments
 (0)