styled-components/babel-plugin-styled-components

replace lodash with lodash.difference

hcourt opened this issue · 0 comments

Lodash is a very large library that impacts performance of downstream projects, and importing it in its entirety is no longer required. This library should be changed to use a lodash.* package like so:

Proposed changes

https://github.com/styled-components/babel-plugin-styled-components/blob/main/src/minify/index.js#L1

import difference from 'lodash.difference'

https://github.com/styled-components/babel-plugin-styled-components/blob/main/package.json#L37

    "lodash.difference": "^4.5.0",

I have a local branch which does this that I would be happy to submit, but PR creation here is disabled.