Skip to content

utils/server.js: cross-platform isMain check#32674

Merged
Mugen87 merged 1 commit intomrdoob:devfrom
ycw:13
Jan 6, 2026
Merged

utils/server.js: cross-platform isMain check#32674
Mugen87 merged 1 commit intomrdoob:devfrom
ycw:13

Conversation

@ycw
Copy link
Copy Markdown
Contributor

@ycw ycw commented Jan 6, 2026

Related issue: #32654 (comment)

Description

Old check used string replace import.meta.url.replace( 'file://', '' ) but on Windows, URLs are like file:///C:/... (3 slashes before drive label), so comparison failed ( C:/... === /C:/... always false )

Now use fileURLToPath(import.meta.url) for proper cross-platform path handling.

@Mugen87 Mugen87 added this to the r183 milestone Jan 6, 2026
@Mugen87 Mugen87 merged commit 3ef3070 into mrdoob:dev Jan 6, 2026
9 checks passed
@ycw ycw deleted the 13 branch January 6, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants