Skip to content

feat: variant-specific assets#1037

Merged
MiquelAdell merged 1 commit intodevelopmentfrom
feat/variant-assets
Oct 23, 2025
Merged

feat: variant-specific assets#1037
MiquelAdell merged 1 commit intodevelopmentfrom
feat/variant-assets

Conversation

@MatiasArriola
Copy link
Copy Markdown
Contributor

@MatiasArriola MatiasArriola commented Oct 22, 2025

📌 References

📝 Implementation

This PR allows to configure variant-specific assets to be copied to the public directory.

In this case it fixes the case where wmr specific files were being included in all variants, increasing bundle size with unused unrelated files.

  • variant-assets directory added
  • scripts/helpers/variant-assets.ts: allows configuring variantAssetsConfig to map directories or files that need to be copied from variant-assets to public
  • Modified scripts/run.ts:
    • build: before build, copy variant assets to public. After build, cleanup the variant assets
    • start-server: before start, copy the assets. Changed to use spawn so process termination can be handled, and files cleaned up
  • Add public/wmr to .gitignore to make sure the files are not committed in case the cleanup does not complete

📹 Screenshots/Screen capture

🔥 Is there anything the reviewer should know to test it?

fix: include wmr assets only in wmr variant
@bundlemon
Copy link
Copy Markdown

bundlemon Bot commented Oct 22, 2025

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
2.78MB (-20B 0%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@MiquelAdell MiquelAdell merged commit d3700e4 into development Oct 23, 2025
6 checks passed
@MiquelAdell MiquelAdell deleted the feat/variant-assets branch October 23, 2025 10:53
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