@@ -2,9 +2,9 @@ import { call, Operation } from "effection";
22import { mkdir , readFile , writeFile } from "node:fs/promises" ;
33import * as path from "node:path" ;
44import * as esbuild from "esbuild" ;
5- import { generateImports } from "./generate-imports.ts " ;
6- import { importInteractors } from "./import-interactors.ts " ;
7- import { generateConstructors } from "./generate-constructors.ts " ;
5+ import { generateImports } from "./generate-imports.js " ;
6+ import { importInteractors } from "./import-interactors.js " ;
7+ import { generateConstructors } from "./generate-constructors.js " ;
88
99export interface BuildOptions {
1010 outDir : string ;
@@ -16,11 +16,11 @@ export function* build(options: BuildOptions): Operation<void> {
1616
1717 yield * call ( ( ) => mkdir ( outDir , { recursive : true } ) ) ;
1818
19- const { modules, agentScriptPath, constructorsPath } = buildAttrs ( options ) ;
19+ let { modules, agentScriptPath, constructorsPath } = buildAttrs ( options ) ;
2020
2121 let modulesList = new Set ( [
2222 // NOTE: Include core by default
23- "@interactors/core" ,
23+ // "@interactors/core",
2424 "@interactors/html" ,
2525 ...modules ,
2626 ] ) ;
@@ -37,7 +37,7 @@ export function* build(options: BuildOptions): Operation<void> {
3737 // TODO use esbuild to agent
3838
3939 let templatePath =
40- new URL ( "../src/templates/agent.ts.template" , import . meta . url ) . pathname ;
40+ require . resolve ( "../src/templates/agent.ts.template" ) ;
4141
4242 let agentTemplate = yield * call ( readFile ( templatePath , "utf8" ) ) ;
4343
0 commit comments