Skip to content

Commit

Permalink
Fix isolate build + components build on windows (#28559)
Browse files Browse the repository at this point in the history
Esbuild requires these values to be reasonable like this to work on windows.
Cross platform - what a headache!

GitOrigin-RevId: 290db0ec5702852ba60b5a7c8155687a2a3a36ed
  • Loading branch information
nipunn1313 authored and Convex, Inc. committed Aug 1, 2024
1 parent b1a92ec commit db55dce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/cli/lib/components/definition/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ const SHARED_ESBUILD_OPTIONS = {

// place output files in memory at their source locations
write: false,
outdir: "/",
outbase: "/",
outdir: path.parse(process.cwd()).root,
outbase: path.parse(process.cwd()).root,

minify: true,
keepNames: true,
Expand Down
7 changes: 1 addition & 6 deletions src/cli/lib/components/definition/directoryStructure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ export function qualifiedDefinitionPath(
workingDir = ".",
) {
const definitionPath = path.relative(workingDir, directory.definitionPath);
// A ./ or ../ prefix make a path "qualified."
if (definitionPath.startsWith("./") || definitionPath.startsWith("../")) {
return definitionPath;
} else {
return `./${definitionPath}`;
}
return `./${definitionPath}`;
}

// NB: The process cwd will be used to resolve the directory specified in the constructor.
Expand Down

0 comments on commit db55dce

Please sign in to comment.