You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Thanks for reporting an issue to micromatch! If you haven't already read the contributor guidelines, Please do that now, then proceed to fill out the details below.)
Please describe the minimum necessary steps to reproduce this issue:
Bundle micromatch with the Angular CLI
What is happening that shouldn't be?
To best support browsers it's a good idea to not directly rely on nodejs.
So we could either directly remove dependencies on nodejs, or provide conditionals
What should be happening instead?
The libs are very close to supporting browser without any bundler intervention as it stands.
These are the few changes needed.
This issue may receive additional interest soon as the the create-react-app project recently updated to version 5.0 which updates WebPack from v4 => v5. WebPack v5 removes default polyfills for NodeJS core modules, so it looks like if you are using picomatch in a browser project you will now need to polyfill path module with path-browserify manually.
It would be nice to have an option for using picomatch natively in browser code without requiring this manual polyfill.
(Thanks for reporting an issue to micromatch! If you haven't already read the contributor guidelines, Please do that now, then proceed to fill out the details below.)
Please describe the minimum necessary steps to reproduce this issue:
Bundle micromatch with the Angular CLI
What is happening that shouldn't be?
To best support browsers it's a good idea to not directly rely on nodejs.
So we could either directly remove dependencies on nodejs, or provide conditionals
What should be happening instead?
The libs are very close to supporting browser without any bundler intervention as it stands.
These are the few changes needed.
https://github.com/micromatch/picomatch/blob/master/lib/picomatch.js#L155
This could be replaced with an internal version of basename
https://github.com/micromatch/picomatch/blob/master/lib/utils.js#L3
This could be replaced with a browser check + conditional require
https://github.com/micromatch/picomatch/blob/master/lib/utils.js#L4
This could be replaced with
The text was updated successfully, but these errors were encountered: