Rebuilt JS assets in production mode#134
Conversation
The committed `assets/built/index.js` was produced by the development build (`rollup --environment BUILD:development`): it began with the livereload script-injection snippet, which every site using the Starter theme shipped to visitors — attempting to load a livereload server from the visiting host on port 35729. Rebuilt with `pnpm build` (production mode), which drops the livereload plugin and bundles only the theme code. Verified the rebuild is deterministic and gscan reports no errors (4 pre-existing warnings unrelated to this change). Found while fixing the pnpm action pin (#133).
|
Warning Review limit reached
More reviews will be available in 10 minutes. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
The committed
assets/built/index.jsonmainwas built in development mode — it begins with rollup-plugin-livereload's script-injection snippet, so every site running the Starter theme serves JS that tries to load a livereload server from the visitor's host on port 35729. Harmless-looking but wrong: a dev artifact shipped to production visitors on what is also the template repo people fork to build themes.This rebuilds with the existing
pnpm build(rollup --environment BUILD:production), which drops livereload and bundles only the theme code (burger menu, pagination/infinite scroll, etc.).Found while fixing the pnpm action pin in #133.
Verification
grep livereload assets/built/index.js— 1 match before, 0 afterpnpm buildruns produce identical output (deterministic)pnpm test(gscan, with pretest zip) — no errors; the 4 warnings (twitter_url/facebook_urldeprecations, custom fonts,@page.show_title_and_feature_image) are pre-existing onmainassets/built/index.js+ its sourcemap