Repository navigation
Replace Parcel with Vite for frontend builds - #4383
Merged
Merged
Conversation
…odules cache Run the stale-chunk cleanup inside NpmRunBuild so it only fires when the build runs. Remove the node_modules cache step: npm ci wipes node_modules, and setup-node already caches the npm download cache. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4383/ |
Member
Author
|
Merging this since this was approved twice over, i just accidentally closed the PR. |
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.
The frontend toolchain moves from Parcel to Vite 8.x, directly on
main. This removes the WindowsTEMPworkaround and stops MSBuild from reading EUI icon chunk names as build errors.Affects: Site UI, Automation
Prompt summary: #3884 replaced Parcel with Vite but went stale. This PR lands the reworked version on its own, independent of the preview upload changes in #4206, which need more production testing.
Why
Parcel needs a Windows-specific workaround (redirecting
TEMPto the same drive) and has no incremental-build hooks, so everydotnet buildruns a fullnpm run build. The MSBuildExectask also scans output for error patterns and fails on chunk names such aschunk-EuiIconWarning-xxx.js, even when the exit code is 0.What
Vite migration
vite.config.tsreplaces.parcelrcand.postcssrc. TheSkipNpmBuildandDesignTimeBuildMSBuild hooks stop npm from running in IDE and--no-buildcontexts.IgnoreStandardErrorWarningFormatstops MSBuild from misclassifying chunk names as diagnostics.ParcelWatchServicebecomesFrontendWatchService.Incremental build guard
The stale-chunk cleanup runs inside
NpmRunBuild, so it only fires when the build runs.main.jsandstyles.cssstay in place, andnpm run buildis skipped when no sources changed.Verify
Stack: none. This replaces #4205 and #4240.
package.jsontakes the highest version per package wheremainand #4240 disagreed (moment2.31.0,typescript-eslint8.70.0), andpackage-lock.jsonis regenerated.🤖 Generated with Claude Code