Skip to content

Replace Parcel with Vite for frontend builds - #4383

Merged
Mpdreamz merged 2 commits into
mainfrom
feature/parcel-removal
Oct 10, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
feature/parcel-removal

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

The frontend toolchain moves from Parcel to Vite 8.x, directly on main. This removes the Windows TEMP workaround 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 TEMP to the same drive) and has no incremental-build hooks, so every dotnet build runs a full npm run build. The MSBuild Exec task also scans output for error patterns and fails on chunk names such as chunk-EuiIconWarning-xxx.js, even when the exit code is 0.

What

Vite migration

vite.config.ts replaces .parcelrc and .postcssrc. The SkipNpmBuild and DesignTimeBuild MSBuild hooks stop npm from running in IDE and --no-build contexts. IgnoreStandardErrorWarningFormat stops MSBuild from misclassifying chunk names as diagnostics. ParcelWatchService becomes FrontendWatchService.

Incremental build guard

The stale-chunk cleanup runs inside NpmRunBuild, so it only fires when the build runs. main.js and styles.css stay in place, and npm run build is skipped when no sources changed.

Verify

cd src/Elastic.Documentation.Site && npm ci && npm run build && npm run test
dotnet build src/tooling/docs-builder

Stack: none. This replaces #4205 and #4240. package.json takes the highest version per package where main and #4240 disagreed (moment 2.31.0, typescript-eslint 8.70.0), and package-lock.json is regenerated.

🤖 Generated with Claude Code

Re-applies #4240 directly on main, independent of the preview upload changes in #4206.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner October 9, 2026 18:28
@Mpdreamz Mpdreamz added the automation packaging, ci/cd. label Oct 9, 2026
@Mpdreamz
Mpdreamz requested a review from theletterf October 9, 2026 18:28
Comment thread .github/actions/bootstrap/action.yml Outdated
Comment thread src/Elastic.Documentation.Site/Elastic.Documentation.Site.csproj
…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>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4383/

@Mpdreamz

Copy link
Copy Markdown
Member Author

Merging this since this was approved twice over, i just accidentally closed the PR.

@Mpdreamz
Mpdreamz merged commit 0e9ad29 into main Oct 10, 2026
32 checks passed
@Mpdreamz
Mpdreamz deleted the feature/parcel-removal branch October 10, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant