Skip to content

Added a --visualize option to generate build output stats - #528

Closed
AlexHayton wants to merge 5 commits into
developit:masterfrom
AlexHayton:master
Closed

AlexHayton wants to merge 5 commits into
developit:masterfrom
AlexHayton:master

Conversation

@AlexHayton

Copy link
Copy Markdown
Contributor

Following up from #526

Updated readme
Added the new visualize flag
Added a test with a postbuild script that copies the stats.html
Allow tests to have a postbuild script! :)

Updated readme
Added the new visualize flag
Added a test with a postbuild script that copies the stats.html
Allow tests to have a postbuild script! :)
@AlexHayton

Copy link
Copy Markdown
Contributor Author

Hmm, I really can't get my snapshots to match travis. Running on OSX here. Does anyone have any idea what's going on?

@AlexHayton AlexHayton changed the title Added a visualize option to generate build output stats Nov 23, 2019
"name": "visualize",
"scripts": {
"build": "microbundle --visualize",
"postbuild": "mv stats.html dist/"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if we can remove the need for a postbuild task. The docs of rollup-plugin-visualize don't mention it, but you can pass a directory with the filename setting.

https://github.com/btd/rollup-plugin-visualizer/blob/41aeee4741ab424c8e4e1ab48930ca5cbd2d8fb1/plugin/index.js#L129

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds like a good plan.

@marvinhagemeister Do you have any idea about the other (unrelated) snapshots that are failing?
Last time I checked master is also failing too... so not sure what to do next.

@developit

Copy link
Copy Markdown
Owner

@AlexHayton sorry for the slow reply - I also have the issue with snapshots being out of sync on Mac OS. Unfortunately, I haven't yet found a fix for this :/

@AlexHayton

Copy link
Copy Markdown
Contributor Author

Sorry I've been away from this for a while. Life got in the way. I'll try and resubmit soon. I worked out why the snapshots were failing, it is an issue with the randomly generated CSS class names in the visualiser output. So I am hoping it's possible to pass a specific seed or just take those out of the snapshots...

@AlexHayton

Copy link
Copy Markdown
Contributor Author

@AlexHayton sorry for the slow reply - I also have the issue with snapshots being out of sync on Mac OS. Unfortunately, I haven't yet found a fix for this :/

@developit I think found a way around this, I will submit it seperately...

@developit

Copy link
Copy Markdown
Owner

Just an update: this should all work without the Docker shennanigans now that we're on GH actions. Sorry!

@AlexHayton

Copy link
Copy Markdown
Contributor Author

Wow, zombie thread back from the dead 😄
I'll give it another go, thank you!

@AlexHayton

AlexHayton commented Dec 18, 2020 •

Copy link
Copy Markdown
Contributor Author

Actually reading my past self's comments, the specific blocker here was the CSS class names... Time to get the thinking caps on!

@developit

Copy link
Copy Markdown
Owner

No pressure btw! I like the idea of this feature though, and I'd be happy to rebase - I don't have the snapshots issues when working in the repo anymore (perhaps they're still there...)

@rschristian

Copy link
Copy Markdown
Collaborator

Ended up implementing in #549 rather than editing this PR directly. It's finally merged!

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

4 participants