Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jul 24, 2024
1 parent 4326a63 commit 11614da
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions libs/langchain-scripts/src/build_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,20 +626,11 @@ export async function buildWithTSup() {
pre,
} = processOptions();

// Required for cross-platform compatibility.
// let importPath = new URL("langchain.config.js", import.meta.url).pathname;
// if (importPath.endsWith("/dist/langchain.config.js")) {
// importPath = importPath.replace(
// "/dist/langchain.config.js",
// "/langchain.config.js"
// );
// }
console.log("------process.cwd()------", process.cwd());
console.log(
"------path.resolve()------",
path.resolve("langchain.config.js")
);
const langchainConfigPath = path.resolve("langchain.config.js");
let langchainConfigPath = path.resolve("langchain.config.js");
if (process.platform === "win32") {
// windows, must resolve path with file://
langchainConfigPath = `file:///${langchainConfigPath}`;
}

const { config }: { config: LangChainConfig } = await import(
langchainConfigPath
Expand Down

0 comments on commit 11614da

Please sign in to comment.