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
I think I found a better way for nolyfill to work with Yarn. Rather than parsing lockfiles, looking for the dependencies to replace, pollute your package.json, and perhaps more importantly, repeat the process after every time dependencies change, why not let Yarn do all the work?
Here's where Yarn Plugins come in. They allow you to hook into Yarn's dependency resolution process and modify it. I built a plugin to replace certain dependencies with their nolyfill equivalents.
How to use it:
Install by executing yarn plugin import https://raw.githubusercontent.com/wojtekmaj/yarn-plugin-nolyfill/v1.0.1/bundles/@yarnpkg/plugin-nolyfill.js.
Reinstall repository by executing yarn.
Poof! ✨
12 packages were added to the project, and 57 were removed (- 1.57 MiB).
You're more than welcome to try it out and let me know what you think.
The latest plugin import command is yarn plugin import https://raw.githubusercontent.com/wojtekmaj/yarn-plugin-nolyfill/v0.1.1/bundles/@yarnpkg/plugin-nolyfill.js now while I don't quite follow why.
Hello!
I think I found a better way for
nolyfill
to work with Yarn. Rather than parsing lockfiles, looking for the dependencies to replace, pollute yourpackage.json
, and perhaps more importantly, repeat the process after every time dependencies change, why not let Yarn do all the work?Here's where Yarn Plugins come in. They allow you to hook into Yarn's dependency resolution process and modify it. I built a plugin to replace certain dependencies with their
nolyfill
equivalents.How to use it:
yarn plugin import https://raw.githubusercontent.com/wojtekmaj/yarn-plugin-nolyfill/v1.0.1/bundles/@yarnpkg/plugin-nolyfill.js
.yarn
.You're more than welcome to try it out and let me know what you think.
See source code: https://github.com/wojtekmaj/yarn-plugin-nolyfill/
The text was updated successfully, but these errors were encountered: