Do not pretty print item-metadata.js in production#432
Merged
Gaurav0 merged 1 commit intoApr 21, 2026
Merged
Conversation
✅ Deploy Preview for liberatedpixelcup ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
jrconway3
approved these changes
Apr 20, 2026
jrconway3
left a comment
Contributor
There was a problem hiding this comment.
Had a weird thing happen where I generated it, it minified properly... then I ran dev and it STAYED minified for some reason.
I deleted the file, re-built, and it worked...
But then I tried it again after I re-built:
- Ran build (changed the existing "prettier" to minified)
- Ran dev (changed the existing minified to "prettier")
cdvv7788
approved these changes
Apr 20, 2026
Gaurav0
added a commit
that referenced
this pull request
Apr 22, 2026
Split generateSources metadata output into index-metadata.js (aliasMetadata, categoryTree, metadataIndexes with byTypeName and hashMatch.itemsByTypeName), palette-metadata.js, lite item-metadata.js, credits-metadata.js, and layers-metadata.js. Use the same dev/prod JSON indent as PR #432. Thread deps.env into generateSources so Vite dev uses pretty-printed JSON. Wire resolve.alias and Rolldown code-splitting groups for all chunks; merge lite + layers + credits in install-item-metadata and static HTML runners. Node tests merge captured writes via mergeMetadataForTests. Made-with: Cursor
Gaurav0
added a commit
that referenced
this pull request
Apr 22, 2026
Expand CONTRIBUTING File Generation: five dist/*-metadata.js files, Vite plugin, catalog getters, catalogReady promises, PR #432 formatting for all modules, and clarify that validate-site-sources does not write dist/ (Vite does). Update README Development generated-files blurb: five modules, catalog registration, dev vs build indentation, link to PR #432. Fix tests glob line and validate-site-sources workflow placement after Prettier. Made-with: Cursor
Gaurav0
added a commit
that referenced
this pull request
Apr 23, 2026
Split generateSources metadata output into index-metadata.js (aliasMetadata, categoryTree, metadataIndexes with byTypeName and hashMatch.itemsByTypeName), palette-metadata.js, lite item-metadata.js, credits-metadata.js, and layers-metadata.js. Use the same dev/prod JSON indent as PR #432. Thread deps.env into generateSources so Vite dev uses pretty-printed JSON. Wire resolve.alias and Rolldown code-splitting groups for all chunks; merge lite + layers + credits in install-item-metadata and static HTML runners. Node tests merge captured writes via mergeMetadataForTests. Made-with: Cursor
Gaurav0
added a commit
that referenced
this pull request
Apr 23, 2026
Expand CONTRIBUTING File Generation: five dist/*-metadata.js files, Vite plugin, catalog getters, catalogReady promises, PR #432 formatting for all modules, and clarify that validate-site-sources does not write dist/ (Vite does). Update README Development generated-files blurb: five modules, catalog registration, dev vs build indentation, link to PR #432. Fix tests glob line and validate-site-sources workflow placement after Prettier. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
File Generation
The runtime UI loads
dist/item-metadata.js, which Vite generates from the sheet JSON undersheet_definitions/(and related inputs) when you runnpm run devornpm run build. Do not edit that file by hand.The JSON embedded in each
constassignment is pretty-printed when Vite runs in development (npm run dev) and compact (no indentation inside those objects) when Vite runs a production build (npm run build). Inspectingdist/item-metadata.jsafter a dev run is easier; CI and release artifacts use the compact form.