Skip to content

fix: Convert paths to fix ERR_UNSUPPORTED_ESM_URL_SCHEME errors on Windows#238

Merged
ai merged 1 commit intopostcss:mainfrom
michael42:fix-windows-url-issue
May 31, 2022
Merged

fix: Convert paths to fix ERR_UNSUPPORTED_ESM_URL_SCHEME errors on Windows#238
ai merged 1 commit intopostcss:mainfrom
michael42:fix-windows-url-issue

Conversation

@michael42
Copy link
Copy Markdown
Contributor

@michael42 michael42 commented May 30, 2022

Notable Changes

Uses url.pathToFileURL when loading using await import(), because that only supports URLs. It worked coincidentally on Linux and MacOS, because they use the same path separator as URLs (/).

Commit Message Summary (CHANGELOG)

fix: Convert paths to fix ERR_UNSUPPORTED_ESM_URL_SCHEME errors on Windows

Type

  • CI
  • Fix
  • Perf
  • Docs
  • Test
  • Chore
  • Style
  • Build
  • Feature
  • Refactor

SemVer

  • Fix (:label: Patch)
  • Feature (:label: Minor)
  • Breaking Change (:label: Major)

Issues

Checklist

  • Lint and unit tests pass with my changes
  • I have added tests that prove my fix is effective/works

@ai ai merged commit 4acf85e into postcss:main May 31, 2022
@ai
Copy link
Copy Markdown
Member

ai commented May 31, 2022

Thanks. Released in 4.0.1.

@michael42 michael42 deleted the fix-windows-url-issue branch July 29, 2022 15:03
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.

v.4.0.0 ESM err on Windows 11

2 participants