File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1+ import { copyFileSync , mkdirSync } from "node:fs" ;
2+ import { join } from "node:path" ;
13import { 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 ) ;
You can’t perform that action at this time.
0 commit comments