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

Idea: Estimate bundle sizes #19

Open
1 of 4 tasks
DrewML opened this issue Dec 4, 2018 · 0 comments
Open
1 of 4 tasks

Idea: Estimate bundle sizes #19

DrewML opened this issue Dec 4, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@DrewML
Copy link
Contributor

DrewML commented Dec 4, 2018

This issue is a:

  • Bug
  • Feature suggestion
  • Documentation issue
  • Other (Please Specify)

Environment

Question Answer
Magento version N/A
Browser + version N/A
node.js version (node -v) N/A
npm version (npm -v) N/A

Description

When recording in the RequireJS tab is completed, a user of this extension is presented with a configuration they can use with the RequireJS Optimizer.

At that time, we have the following data:

In a bundled file, the RequireJS Optimizer only makes 1 change to each included AMD module: it adds a string literal as the first value in the define call.

I suspect we could get a decent estimate of a final bundle's size by:

  1. Collecting all resources that will be in the bundle
  2. Concatenating all those sources together
  3. Running the result through uglifyjs2 (used by the RequireJS Optimizer)

Expected result:

Either one of 2 results should come from this issue:

  • Bundle size estimates are included in the Bundle Generation tool
  • It's determined the estimates will be too incorrect to be useful
@DrewML DrewML added the enhancement New feature or request label Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant