simonihmig / ember-cli-bundle-analyzer

Analyze the size and contents of your Ember app's bundles
MIT License
99 stars 2 forks source link

Is there a way to generate a self-contained HTML file that has the bundle analysis? #298

Closed NullVoxPopuli closed 1 year ago

NullVoxPopuli commented 1 year ago

for https://limber.glimdown.com, I deploy bundle analysis to bundle.html (currently just the webpack stuff). For example : https://limber.glimdown.com/bundle.html (linked to in the header of Limber)

as far as I've been able to tell, this addon only(?) relies on middleware triggered by visiting _analyze? Is it worth it to include a flag or something that generates a bundle.html for production? or maybe embroider-only builds are too close to becoming a reality? :thinking: I am not sure

simonihmig commented 1 year ago

Sorry for the late answer... I don't think there is much value for this, as the middleware wraps https://github.com/danvk/source-map-explorer, so instead of remove the wrapping middleware part, you could instead just run that lib (it has a standalone bin). Just make sure that you sourcemaps are good and hi-fi (no webpack eval stuff). You could use or copy-paste from https://github.com/simonihmig/ember-cli-bundle-analyzer/blob/master/create-config.js

NullVoxPopuli commented 1 year ago

thanks!!