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

feat: setup bundlesize #914

Merged
merged 5 commits into from
Jul 4, 2019
Merged

feat: setup bundlesize #914

merged 5 commits into from
Jul 4, 2019

Conversation

montezume
Copy link
Contributor

@montezume montezume commented Jul 4, 2019

Summary

Adds bundlesize to track our bundlesize in PRs

Closes #829

@tdeekens
Copy link
Contributor

tdeekens commented Jul 4, 2019

Huuzaaah.

@montezume
Copy link
Contributor Author

I added the token to our CI variables. I'm not sure if anything is missing 🤔

"files": [
{
"path": "./dist/ui-kit.esm.js",
"maxSize": "175 kB"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you give more information? What is correct? The max size?

Copy link
Member

Choose a reason for hiding this comment

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

Yes the max size...currently it's like >700KB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's correct. When I run bundlesize it gives ~165.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen Shot 2019-07-04 at 11 40 34 AM
which is very close to your links result...

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok it gzippes it

image

Copy link
Contributor Author

@montezume montezume Jul 4, 2019

Choose a reason for hiding this comment

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

In fact I think we should lower this. It should be maybe ~5%

@@ -122,6 +122,7 @@
"babel-plugin-transform-rename-import": "2.3.0",
"babel-preset-jest": "24.6.0",
"browserslist": "4.6.3",
"bundlesize": "0.18.0",
Copy link
Member

Choose a reason for hiding this comment

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

We also need to trigger the bundlesize on CI...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how do we do this? I can't find instructions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the token to our env vars

Copy link
Member

Choose a reason for hiding this comment

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

Just add a step on CI to execute bundlesize. That's it.

After this:

- run: yarn build

Just add

- run: yarn run bundlesize

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -131,6 +135,12 @@ jobs:
- install_dependencies
- restore_workspace
- bundle_test
bundle_size_test:
Copy link
Member

Choose a reason for hiding this comment

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

No new job please, just keep it simple: #914 (comment)

@montezume montezume self-assigned this Jul 4, 2019
Copy link
Member

@emmenko emmenko left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good now! 💯

@montezume montezume requested a review from tdeekens July 4, 2019 09:45
@montezume
Copy link
Contributor Author

Should I add this to app kit as well? 🤔

@montezume montezume force-pushed the ml-use-bundlesize branch from 5888156 to ad2cff1 Compare July 4, 2019 09:47
@montezume montezume merged commit c74581f into master Jul 4, 2019
@montezume montezume deleted the ml-use-bundlesize branch July 4, 2019 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keeping track of bundle size
3 participants