Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows #211

Merged
merged 5 commits into from
Apr 3, 2024
Merged

Fix Windows #211

merged 5 commits into from
Apr 3, 2024

Conversation

TheUltDev
Copy link
Contributor

@TheUltDev TheUltDev commented Jan 1, 2024

Fixes #205.

This change appends the file:// protocol to windows paths to the error below
(technically we let pathToFileURL from node:url do the work)

ESBuild: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader.
On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

@TheUltDev
Copy link
Contributor Author

TheUltDev commented Jan 2, 2024

@yuanqing this is ready (no more commits expected)

Verified on a Windows machine with all overrides present.

@XmlmXmlmX
Copy link

I need this, please

@@ -16,6 +18,8 @@ import { importFresh } from '../import-fresh.js'
import { esbuildCssModulesPlugin } from './esbuild-css-modules-plugin.js'
import { esbuildPreactCompatPlugin } from './esbuild-preact-compat-plugin.js'

const isWindows = platform() === 'win32'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a dumb question, as I haven't done any platform-specific node development, but I assume this is win32 even on 64-bit OSes?

@JanJankowskiEvinced
Copy link

@yuanqing Can we please get this PR merged? It's a major blocker in upgrading to the newest version for windows users

@yuanqing yuanqing changed the base branch from main to next April 3, 2024 22:28
@yuanqing yuanqing merged commit 5c32828 into yuanqing:next Apr 3, 2024
@yuanqing
Copy link
Owner

yuanqing commented Apr 4, 2024

@TheUltDev – Thanks for this! I’ve merged but made a small change to move the logic into importFresh; see 7d37de7. The fix will be included in v3.2.0

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.

Building with 3.0.2 fails on Windows if there's a build-figma-plugin.ui.cjs file in the repo
5 participants