FredKSchott / rollup-plugin-polyfill-node

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

Use filenames which work on Windows #24

Closed rpadaki closed 3 years ago

rpadaki commented 3 years ago

On Windows, : is not a valid character in filenames! This PR replaces it with ., which should be similarly legible but will work cross-platform.

This seems to be the only part of snowpack which didn't work on Windows -- it causes problems when setting nodePolyfill: true because it prevents the _polyfill-node:*.js files from actually being written to disk. Instead, an empty _polyfill-node was being created. Now, these files are of the form _polyfill-node.*.js.

Note that I've updated the assertion in the broken crypto test as well to match the new file names.

(Note: I initially used #, but it occurred to me that . would be much cleaner!)

FredKSchott commented 3 years ago

LGTM!