Skip to content
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

Reduce bundle size (7.2MB -> 5.4MB) with consistent grommet imports #1038

Merged
merged 4 commits into from
Sep 28, 2022

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Sep 27, 2022

No description provided.

@github-actions
Copy link

github-actions bot commented Sep 27, 2022

MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 23 0 0.05s
✅ GIT git_diff yes no 0.01s
✅ JAVASCRIPT eslint 2 0 0 4.93s
✅ TSX eslint 21 0 0 8.56s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

@csillag
Copy link
Contributor

csillag commented Sep 27, 2022

Considering the current build system, does using "import type" (instead of simple import) make any difference in the compiled product? I see a mixed practice in the current codebase, including this PR.

Copy link
Contributor

@csillag csillag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no issues, besides the small thing of inconsistent usage of import type.

@lukaw3d
Copy link
Member Author

lukaw3d commented Sep 28, 2022

Ah yeah, I'll remove that import type (has nothing to do with reducing size)

@@ -18,7 +18,7 @@ const config = {
transform: {
'^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': '<rootDir>/internals/jest/babelTransform.js',
},
transformIgnorePatterns: ['/node_modules/(?!(cborg)/)'],
transformIgnorePatterns: ['/node_modules/(?!(cborg)|(grommet/es6)|(grommet-icons/es6)/)'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go with one capturing group
transformIgnorePatterns: ['/node_modules/(?!(cborg|grommet/es6|grommet-icons/es6)/)'],

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep yep

@lukaw3d lukaw3d merged commit 5bfbe1e into master Sep 28, 2022
@lukaw3d lukaw3d deleted the lw/consistent-grommet branch September 28, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants