-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean dependencies #739
base: master
Are you sure you want to change the base?
Clean dependencies #739
Changes from all commits
4f1041c
6d25bed
06c2a6b
1c3c46a
5fc74c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { NodePath } from '@babel/core'; | ||
import generate from '@babel/generator'; | ||
import * as t from '@babel/types'; | ||
import get from 'lodash/get'; | ||
import get from 'lodash.get'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really dislike these little packages. they may be smaller but it usually balloons the dep tree and number of transitive dependencies significantly. What is the actual cost saves between all of them over installing lodash. TBH I don't understand this sort of optimization, even on slow networks installing 70kb of text is not expensive, in the context of "putting files on disk to do development", I would imagine (unscientifically) having more limited deps, thereby reducing the amount of network hops and logic required by bundlers to install would be faster overall. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For instance, I don't have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RKatarine @jquense @ai can we replace lodash by native ECMAScript features? |
||
|
||
import { | ||
DynamicStyle, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import camelCase from 'lodash/camelCase'; | ||
import flow from 'lodash/flow'; | ||
import upperFirst from 'lodash/upperFirst'; | ||
import camelCase from 'lodash.camelcase'; | ||
import flow from 'lodash.flow'; | ||
import upperFirst from 'lodash.upperfirst'; | ||
|
||
export default flow(camelCase, upperFirst); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the tradeoff for this. is lilconfig feature matched with cosmiconfig (given what we and users might depend on)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature match is the idea of
lilconfig
(but it has fewer dependencies and works faster). I moved fromcosmiconfig
tolilconfig
in PostCSS Load Config and Size Limit without any problems.