yuanqing / create-figma-plugin

:battery: The comprehensive toolkit for developing plugins and widgets for Figma and FigJam
https://yuanqing.github.io/create-figma-plugin/
MIT License
902 stars 85 forks source link

Fix Windows #211

Closed TheUltDev closed 3 months ago

TheUltDev commented 6 months ago

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 commented 6 months ago

@yuanqing this is ready (no more commits expected)

Verified on a Windows machine with all overrides present.

XmlmXmlmX commented 6 months ago

I need this, please

JanJankowskiEvinced commented 3 months ago

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

yuanqing commented 3 months ago

@TheUltDev – Thanks for this! I’ve merged but made a small change to move the logic into importFresh; see https://github.com/yuanqing/create-figma-plugin/commit/7d37de769b1b87ce72b0216a55cf6953593b06aa. The fix will be included in v3.2.0