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

Analyse bundle size in CI (show in PR) #149

Open
Kamahl19 opened this issue Dec 1, 2019 · 1 comment
Open

Analyse bundle size in CI (show in PR) #149

Kamahl19 opened this issue Dec 1, 2019 · 1 comment

Comments

@Kamahl19
Copy link

Kamahl19 commented Dec 1, 2019

Has anyone setup this to run as a GH action to show the bundle size in PR? I imagine a GH Action to build the app, run the analyse and post a comment with link to analyse into PR. It could even print a diff in size against Master branch. We could even have a badge in README pointing to current analyse of master.

@bxt
Copy link

bxt commented Apr 29, 2020

We have set this up, but independent of source-map-explorer. After our app is build we use a script using node's fs.stat function to measure the total bundle size. We also get the bundle size from master form a build docker image for comparison. We then use the GitHub statuses API to attach the result to the PR. We also run source-map-explorer and link to it's report from the PR, so if the numbers increased you can check manually where the problem is. It is a bit of work to write a script that does all that, but I think it's not in scope of source-map-explorer, it's also very much dependent on wether you use GitLab/GitHub/Jenkins/Travis/...

What could be in scope of source-map-explorer maybe (I guess the maintainers have to decide that) is a comparison view, where you can compare two sets of bundle files, that would be pretty cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants