FredKSchott / rollup-plugin-polyfill-node

A modern Node.js polyfill for your Rollup bundle.
Other
175 stars 55 forks source link

Always use POSIX path separators for imports #26

Closed rpadaki closed 3 years ago

rpadaki commented 3 years ago

On Windows, the path.join and path.dirname and path.relative calls were using \\ separators instead of / -- Node JS should always be using the latter! This caused polyfills which used relative imports, such as http-lib, to fail on Windows machines, even after patching my snowpack install to apply #24.

This solves the problem by using path.posix.join and similar.

(And apologies for all the third-party reviews, looks like my teammates are trying to embarrass me publicly.)

FredKSchott commented 3 years ago

lol I love it :) 👋

Sorry for the delay, LGTM!