-
Notifications
You must be signed in to change notification settings - Fork 196
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
chore: lodash tree shaking imports #38
chore: lodash tree shaking imports #38
Conversation
|
We are going to add this to the guide soon for the better readability (ideally enforce by linting). Can you apply the following pattern on modules import ? Basically imports are separated into 3 chunks by a new line:
And each chunk of imports are sorted alphabetically. |
packages/api/src/clickhouse/index.ts
Outdated
@@ -1,6 +1,6 @@ | |||
import * as fns from 'date-fns'; | |||
import SqlString from 'sqlstring'; | |||
import _ from 'lodash'; | |||
import map from 'lodash/map'; |
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.
I think we don't need to do the tree shaking for files in api/
.
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.
I will assume, bundle size is not a concern for server side, as you are not deploying onto a serverless environment. Please correct me if am wrong
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.
Correct, its not for the serverless environment
Taken care of the import order issues |
Things look good. Just need to resolve the conflicts and rollback changes in |
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.
LGTM. Thanks for cleaning things up!
lodash
on the frontend #36