Skip to content

Commit 19eacad

Browse files
nipunn1313Convex, Inc.
authored andcommitted
Fix isolate build + components build on windows (#28559)
Esbuild requires these values to be reasonable like this to work on windows. Cross platform - what a headache! GitOrigin-RevId: 290db0ec5702852ba60b5a7c8155687a2a3a36ed
1 parent 1ae5c02 commit 19eacad

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

crates/isolate/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ use value::sha256::Sha256;
1919

2020
const PACKAGES_DIR: &str = "../../npm-packages";
2121
const NPM_DIR: &str = "../../npm-packages/convex";
22-
const SYSTEM_UDFS_DIR: &str = "../../npm-packages/system-udfs/convex/_system";
23-
const UDF_RUNTIME_DIR: &str = "../../npm-packages/udf-runtime/src";
22+
const SYSTEM_UDFS_DIR: &str = "../system-udfs/convex/_system";
23+
const UDF_RUNTIME_DIR: &str = "../udf-runtime/src";
2424
const UDF_TESTS_DIR: &str = "../../npm-packages/udf-tests";
2525
const COMPONENT_TESTS_DIR: &str = "../../npm-packages/component-tests/layouts";
2626
const NODE_EXECUTOR_DIST_DIR: &str = "../../npm-packages/node-executor/dist";
@@ -170,8 +170,8 @@ fn main() -> anyhow::Result<()> {
170170
.arg("run")
171171
.arg("--silent")
172172
.arg("bundle-server")
173-
.arg(Path::new(UDF_RUNTIME_DIR).canonicalize()?)
174-
.arg(Path::new(SYSTEM_UDFS_DIR).canonicalize()?)
173+
.arg(Path::new(UDF_RUNTIME_DIR))
174+
.arg(Path::new(SYSTEM_UDFS_DIR))
175175
.output()
176176
.context("Failed on npm run bundler")?;
177177
anyhow::ensure!(

npm-packages/convex/src/cli/lib/components/definition/bundle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ const SHARED_ESBUILD_OPTIONS = {
177177

178178
// place output files in memory at their source locations
179179
write: false,
180-
outdir: "/",
181-
outbase: "/",
180+
outdir: path.parse(process.cwd()).root,
181+
outbase: path.parse(process.cwd()).root,
182182

183183
minify: true,
184184
keepNames: true,

npm-packages/convex/src/cli/lib/components/definition/directoryStructure.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ export function qualifiedDefinitionPath(
3232
workingDir = ".",
3333
) {
3434
const definitionPath = path.relative(workingDir, directory.definitionPath);
35-
// A ./ or ../ prefix make a path "qualified."
36-
if (definitionPath.startsWith("./") || definitionPath.startsWith("../")) {
37-
return definitionPath;
38-
} else {
39-
return `./${definitionPath}`;
40-
}
35+
return `./${definitionPath}`;
4136
}
4237

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

0 commit comments

Comments
 (0)