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

Build Open MCT with Terser plugin to reduce library size. #7286

Closed
akhenry opened this issue Dec 10, 2023 · 3 comments · Fixed by #7246
Closed

Build Open MCT with Terser plugin to reduce library size. #7286

akhenry opened this issue Dec 10, 2023 · 3 comments · Fixed by #7246
Labels
type:enhancement verified Tested or intentionally closed
Milestone

Comments

@akhenry
Copy link
Contributor

akhenry commented Dec 10, 2023

Is your feature request related to a problem? Please describe.
Experimentation has shown that the Terser plugin may significantly reduce the size of our built library.

We should also consider using Terser in some of our other projects (viper-openmct, openmct-yamcs, openmct-mmgis).

@ozyx
Copy link
Contributor

ozyx commented Dec 15, 2023

So as it turns out, Webpack is already using TerserPlugin and applying sensible defaults (that net us the lowest bundle size without doing crazy things).

@ozyx
Copy link
Contributor

ozyx commented Dec 20, 2023

Testing Instructions

  • Clone a fresh copy of openmct
  • git checkout 715a44864e92e97f982a21c80522dc2f07f3d687^1
  • npm i; npm pack
  • Move the generated *.tgz archive to another folder (outside of openmct repo)
  • git checkout 715a44864e92e97f982a21c80522dc2f07f3d687
  • npm run clean; npm i; npm pack
  • compare packed / unpacked space
  • Manual smoke test of basic usage

@unlikelyzero unlikelyzero added this to the Target:4.0.0 milestone Feb 8, 2024
@davetsay
Copy link
Contributor

verified. packed goes from 9747535 to 9260085.

@unlikelyzero unlikelyzero added the verified Tested or intentionally closed label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement verified Tested or intentionally closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants