Feature Request: Consolidation of JavaScript Files in Distribution Builds #17181
Unanswered
itinance
asked this question in
Ideas / Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the distribution build process generates multiple JavaScript files for each Pinia store, component, etc. For performance optimization, it would be beneficial to reduce the number of files produced. Ideally, the browser would download fewer but larger files—perhaps 4 or 6 files instead of 24. Additionally, the current naming convention includes the component names in the filenames, which inadvertently exposes internal details that should not be publicly accessible in a distribution build. Consolidating files and revising filename conventions could enhance both performance and security.
Example of a dist-build:
Instead of filenames like
QChip.js
anddatetime.js
, we should consider using more generic, non-descriptive filenames such as:$projectname.123123213.js
$projectname.23423424.js
$projectname.333234234.js
These examples suggest using a combination of project-specific identifiers and unique numbers, possibly derived from an enumeration or timestamp mechanism, to enhance security and minimize information leakage.
What are your thoughts on this proposal? Additionally, is this functionality already possible and simply not documented? If so, any guidance would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions