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

Add task analyze (use source-map-explorer) #553

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

tokland
Copy link
Collaborator

@tokland tokland commented Nov 18, 2024

Add task to analyze the build size of the package

📝 Implementation

  • Add package source-map-explorer
  • Add task "analyze"

🔥 Notes for the reviewer

Example for HTML output (a page will be open in a browser)::

$ yarn analyze

Example for TSV output:

$ yarn analyze --tsv |& grep node_modules | head -n10
../node_modules/exceljs/dist/exceljs.min.js	1165355
../node_modules/@eyeseetea/d2-api/2.36/schemas.js	415692
../node_modules/xlsx/xlsx.mjs	328005
../node_modules/react-dom/cjs/react-dom.production.min.js	118664
../node_modules/lodash/lodash.js	71604
../node_modules/@eyeseetea/d2-ui-components/node_modules/lodash/lodash.js	71403
../node_modules/lodash/lodash.min.js	70900
../node_modules/@eyeseetea/feedback-component/node_modules/moment/moment.js	60318
../node_modules/moment/moment.js	60229
../node_modules/@eyeseetea/d2-api/node_modules/iconv-lite/encodings/sbcs-data-generated.js	57519

From here we can start an analysis of the packages, for example:

24c354c1 (Eduardo Peredo Rivero 2023-07-28 12:21:07 -0500  36)         "exceljs": "4.3.0",
247f3c3d (Eduardo Peredo Rivero 2024-02-10 15:55:56 -0500  57)         "xlsx": "^0.18.5"

The schemas thing with d2-api is a known problem, but we've had no time to see how to solve it.

@tokland
Copy link
Collaborator Author

tokland commented Nov 19, 2024

  • Move xlsx to devDependencies (as it's only used for a script):

5,9M data-management-app.zip -> 5,4M data-management-app.zip

  • Test script
  • Test zip app (download data, download MER)

@Ramon-Jimenez Ramon-Jimenez merged commit e17494b into development Nov 19, 2024
1 check was pending
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.

3 participants