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

🚧 WIP: added Rollup Analyzer for bundle analysis #39

Closed
wants to merge 1 commit into from

Conversation

FND
Copy link
Contributor

@FND FND commented Mar 12, 2018

see commit message for details; suggestions welcome

npm test provides a basic impression of what it looks like

caveat: It looks like tree shaking is not being taken into account, which makes results questionable.

test_browserslist
transpiling JavaScript for IE 11
…
-----------------------------
bundle size: 13.464 KB
-----------------------------
file: babelHelpers
size: 13.145 KB
percent: 97.63%
dependents: 1
  - /src/util.js
-----------------------------
file: /src/util.js
size: 213 Bytes
percent: 1.58%
dependents: 1
  - /src/index.js
-----------------------------
file: /src/index.js
size: 106 Bytes
percent: 0.79%
dependents: 0
-----------------------------

(The bundle's actual size is just 0.5 kB.)

@FND FND requested a review from moonglum March 12, 2018 08:17
@FND FND force-pushed the bundle-analysis branch from 5d5cfb2 to 44bfe2d Compare March 12, 2018 08:17
caveats:
* analyzer options (limit, filter, suppress) should be configurable -
  but how/where?
* ideally, low-level modules like `lib/bundle/bundler.js` shouldn't be
  responsible for printing user-facing messages (in this case, I didn't
  want to pass through `bundle` - but perhaps there's a more elegant way
  after all?)
* `configDir` needs to be passed through for use as `root` (cf. inline
  comment; I just haven't gotten around to doing that yet)

as suggested by @moonglum
@FND FND force-pushed the bundle-analysis branch from 44bfe2d to 4d37b6d Compare March 12, 2018 08:20
@moonglum
Copy link
Member

If it doesn't take treeshaking into account, then it is misleading and we should not include it IMHO.

@FND
Copy link
Contributor Author

FND commented Mar 12, 2018

Let's see whether there's anything to be done about that: doesdev/rollup-analyzer#3

@FND FND mentioned this pull request Jul 7, 2018
5 tasks
@FND
Copy link
Contributor Author

FND commented Jul 7, 2018

superseded by #61

@FND FND closed this Jul 7, 2018
@moonglum moonglum deleted the bundle-analysis branch July 8, 2018 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants