chore(dev): cleanup and bump to vite 8 - #2844
Conversation
Coverage Report for ./packages/components/
File Coverage
|
||||||||||||||||||||||||||||||||||||||
🚀 Preview DeploymentPreview environments are ready:
Images:
|
✅ Visual Regression Tests PassedAll visual snapshots match the committed baselines. |
✅ Cross-Version Tests PassedThe current host still renders old published remote versions correctly (iframe) and in the same DOM shape (in-process). Iframe harness (attribute-accurate): ✅ passed In-process harness (structure-only): ✅ passed |
There was a problem hiding this comment.
Pull request overview
This PR updates the monorepo’s frontend/tooling stack to Vite 8 and aligns related build/test infrastructure (Vite configs, declaration generation, banner injection, and Node/ESM path handling) across multiple packages.
Changes:
- Bump Vite to
^8.2.1across packages and refresh the lockfile accordingly. - Replace
vite-plugin-banner/vite-plugin-dtswith a shared internal banner plugin andunplugin-dts. - Adjust Node/ESM behavior and build/test configs (e.g.,
import.meta.dirname, remote-core DOM shim ordering, Vitest browser config re-exports).
Reviewed changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates resolved dependency graph for Vite 8 + related tooling changes. |
| packages/remote-react-renderer/vite.config.ts | Switches alias path base to import.meta.dirname. |
| packages/remote-react-renderer/vite.build.config.ts | Migrates to viteBannerPlugin and unplugin-dts. |
| packages/remote-react-renderer/package.json | Updates devDependencies (Vite 8, unplugin-dts) and adds workspace core dependency. |
| packages/remote-react-components/vitest.config.ts | Imports Vitest browser config from consolidated core entry. |
| packages/remote-react-components/vite.config.ts | Switches alias path base to import.meta.dirname. |
| packages/remote-react-components/vite.build.config.ts | Migrates to viteBannerPlugin and unplugin-dts. |
| packages/remote-react-components/src/tests/lib/visualTheme.ts | Avoids vitest/browser import by using UA-based theme detection. |
| packages/remote-react-components/package.json | Updates devDependencies for Vite 8 + unplugin-dts; removes legacy rollup/vite plugins. |
| packages/remote-react-components/e2e/cross-version-inprocess/vitest.config.ts | Imports Vitest browser config from consolidated core entry. |
| packages/remote-elements/vite.config.ts | Switches alias path base to import.meta.dirname. |
| packages/remote-elements/vite.build.config.ts | Migrates d.ts generation to unplugin-dts. |
| packages/remote-elements/package.json | Updates devDependencies for Vite 8 + unplugin-dts. |
| packages/remote-core/vite.config.ts | Switches alias path base to import.meta.dirname. |
| packages/remote-core/vite.build.config.ts | Migrates d.ts generation to unplugin-dts. |
| packages/remote-core/tsconfig.vite.json | Removes Vite-specific TS project config. |
| packages/remote-core/tsconfig.json | Drops reference to removed tsconfig.vite.json. |
| packages/remote-core/src/shim.ts | Makes DOM shim conditional and exposes a used binding to preserve evaluation order. |
| packages/remote-core/src/index.ts | Ensures DOM shim is evaluated before re-exporting RemoteElement-related modules. |
| packages/remote-core/src/index-node.ts | Ensures shim import stays first under the node export condition. |
| packages/remote-core/package.json | Updates devDependencies for Vite 8 + unplugin-dts. |
| packages/react-tunnel/vitest.config.ts | Imports Vitest browser config from consolidated core entry. |
| packages/react-tunnel/vite.config.ts | Switches alias path base to import.meta.dirname. |
| packages/react-tunnel/vite.build.config.ts | Migrates to viteBannerPlugin and unplugin-dts. |
| packages/react-tunnel/package.json | Updates devDependencies for Vite 8 + unplugin-dts and adds workspace core dependency. |
| packages/mstudio-ext-react-components/vite.config.ts | Switches alias path base to import.meta.dirname. |
| packages/mstudio-ext-react-components/vite.build.config.ts | Migrates to viteBannerPlugin and unplugin-dts. |
| packages/mstudio-ext-react-components/package.json | Updates devDependencies for Vite 8 + unplugin-dts; removes legacy rollup/vite plugins; adds workspace core dependency. |
| packages/icons-base/package.json | Fixes private field to boolean. |
| packages/ext-bridge/vite.config.ts | Switches alias path base to import.meta.dirname. |
| packages/ext-bridge/vite.build.config.ts | Migrates d.ts generation to unplugin-dts. |
| packages/ext-bridge/package.json | Updates devDependencies for Vite 8 + unplugin-dts. |
| packages/design-tokens/package.json | Removes package-level prettier dependency. |
| packages/core/src/viteBannerPlugin.ts | Adds shared internal banner plugin used by multiple package builds. |
| packages/core/src/index.ts | Re-exports new shared utilities from core. |
| packages/core/package.json | Adds Vite devDependency to support typing for the shared plugin. |
| packages/components/vitest.config.ts | Imports Vitest browser config from consolidated core entry. |
| packages/components/vite.config.ts | Adjusts local plugin imports and switches alias base to import.meta.dirname. |
| packages/components/vite.build.config.ts | Migrates to viteBannerPlugin and unplugin-dts. |
| packages/components/tsconfig.vite.json | Removes Vite-specific TS project config. |
| packages/components/tsconfig.json | Drops references to removed TS project configs; keeps base TS options. |
| packages/components/tsconfig.dev.json | Removes dev-only TS project config. |
| packages/components/src/integrations/@mittwald/password-tools-js/defaultPasswordCreationPolicy.ts | Switches integration imports to explicit subpath imports. |
| packages/components/package.json | Updates Vite + dts tooling; adjusts PostCSS-related dependency versions; removes prettier dependency. |
| packages/components/dev/vite/viteI18nPlugin.test.ts | Switches path resolution in tests to import.meta.dirname. |
| packages/components/dev/vite/cssModuleClassNameGenerator.ts | Switches path resolution to import.meta.dirname. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 55 out of 56 changed files in this pull request and generated no new comments.
Suppressed comments (3)
packages/react-tunnel/vitest.config.ts:4
- The import specifier uses a trailing slash ("../core/") which may resolve differently than "../core" (especially under ESM directory-resolution rules) and is inconsistent with the other updated config imports. This can cause Vitest to fail to resolve the module entry depending on the resolver.
import { vitestBrowserTestConfig } from "../core/";
packages/react-tunnel/vite.build.config.ts:28
preserveUseClientBannerintentionally returns an empty string forindex.mjsand only matches.mjsfilenames. In this build config there is a singleindexentry and nopreserveModules/ customentryFileNames, so the post-banner will very likely never emit the"use client"directive anymore (regression vs the previousvite-plugin-bannerlogic that covered the entry).
rolldownOptions: {
output: {
postBanner: preserveUseClientBanner,
},
},
packages/components/package.json:3
- This PR changes multiple package versions from
0.2.0-alpha.1032down to0.2.0-alpha.1026, while other workspace packages (e.g.packages/typescript-config/package.json) remain on0.2.0-alpha.1032. That leaves the monorepo versions inconsistent and also looks like an accidental downgrade unrelated to the Vite 8 bump.
"version": "0.2.0-alpha.1026",
No description provided.