Closed danieldelcore closed 5 months ago
Latest commit: 0f471c556f2e74e36fa3060f373af84b731fcae9
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
When co-locating codemods with existing packages such as
react
etc, you will likely need to install various dependencies to perform various tasks like utils, parsing, etc. These dependencies when added to your package increase the bundlesize for regular consumers even if they're not using the codemods.This change introduces a way around this by adding a new property to the config object
dependencies
where you can specify the devDeps you would like to whitelist.dependencies: ['@hypermod/utils', 'postcss']
These will be ready by hypermod and referenced against the package.json, then installed with the package at transformation time avoiding the bundlesize bloat for regular consumers.