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

Vite config for prod only minification #2286

Open
wants to merge 2 commits into
base: alpha
Choose a base branch
from

Conversation

chrisolsen
Copy link
Collaborator

This change will allow for one to step through the code within the inspector, but still publish a minified file to npm.

Steps needed to test

  1. Compile the web-components lib via npx nx reset; npm run build and note the file size (~760KB).
  2. Create a .env file and add VITE_DEV=true
  3. Recompile the project npx nx reset; npm run build. The new size of the build would be ~1.2MB

Setting `VITE_DEV=true` in a local `.env` file will not minify the
web-component code, allowing one to step through the code within the
browser inspector.
Copy link
Collaborator

@vanessatran-ddi vanessatran-ddi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested both dev is true and false, everything works well.

@BumbleB2na BumbleB2na self-requested a review December 5, 2024 18:19
Copy link
Collaborator

@BumbleB2na BumbleB2na left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm the compiled size changes: ui-components\dist\libs\web-components

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