-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Excludes packages imported using ember-auto-import #34
Comments
Thanks for pointing this out! I quickly skimmed through the
It seems the bundled JavaScript by The analyzer capabilities here are pretty much coupled to Maybe we should have tools that are agnostic of the bundler used, something like https://github.com/danvk/source-map-explorer which only relies on sourcemaps? @stefanpenner your thoughts? |
I don't think this is really a problem with broccoli-concat-analyzer. I think the stage where it analyzes is appropriate. It would be much better if auto-import could go back to emitting code in I hope ember-cli will sort that out and I can go back to using treeForVendor. |
Thanks for the quick feedback!
Agree. Assuming that is the case, how does the emitted vendor tree look like? Looking at this previous code it would be just one big .js file that webpack already pre-bundled. If so this would be opaque to |
True. Maybe a sourcemap-based solution would be better for that. |
Thanks for all the context guys, makes sense. I'm happy if you want to go ahead and close the issue. |
Or maybe before you had two copies of mapbox-gl.js somehow. 😛 |
@ef4 that's terrifying! 😂 |
just got bit by this! |
Maybe I missed the solution but... if Ember is building with 1.5MB but this tool only outputs 446KB for vendor, what would be causing this? It seems this is a similar issue but I'm not sure? |
As a workaround, it's possible to get a separate report for just the ember-auto-imported things by adding webpack-bundle-analyzer directly to ember-auto-import's configuration: autoImport: {
webpack: {
plugins: [
new (require("webpack-bundle-analyzer")).BundleAnalyzerPlugin(),
],
},
}, When you run |
broccoli-concat-analyser only provides insights into what broccoli-concat concats. So I'm not sure it is bug that other mechanisms of concatenation are not accounted for. That being said, I do totally agree a holistic tool would be better, and as part of the embroider world, we most likely already have that (as @ef4 describes above) |
It appears that broccoli-concat-analyser doesn't include packages which have been imported using ember-auto-import. I'm unsure whether the issue is in this addon or ember-auto-import but thought I'd open it here first.
To reproduce the issue I've made a sample repo where I've done the following:
Running
ember asset-sizes
we get the following size vendor.jsBut broccoli-concat-analyser outputs the following size for vendor.js
There looks to be a large discrepancy there. Looking at the generated stats it appears the auto-imported
lodash
has been excluded.The reproduction repo is here and I've committed the generated broccoli-concat-analyser stats
The text was updated successfully, but these errors were encountered: