Closed Krutsch closed 2 years ago
@michael42 seems like ESM loader has a problem with Windows. We may need pathToFileURL
.
Oh, that sounds plausible. I do all my development on Linux, so I can't verify that right away, but others also had the same issue. I'll prepare a PR, but testing that is a bit weird because pathToFileURL
is platform-specific (since C:\abc.txt
is a completely valid file name on Linux).
I did leave out trying to explicitly test that in the PR, since that would be pretty cumbersome and I'm almost sure the tests were already failing on Windows before the fix. So I think it would be best to just run the existing tests on Windows, if that's not too much trouble.
Had to change the pattern for uvu locally but can confirm it works 👍🏼
The fix was released in 4.0.1.
@michael42 thanks for the fast and great job.
Node.js version 17.9.0
Code to reproduce: type module in package.json. postcss.config.cjs:
let { plugins, options, file: postcssFile } = await postcssrc({});
This did not error in the verion before