Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces direct rollup type imports within the App Shell Vite plugin code and modernizes the shared Vite config to use import.meta.dirname instead of a CJS-style __dirname shim, aiming to keep behavior unchanged while decreasing Rollup-coupled typing.
Changes:
- Removed
rollup-specific type imports (NormalizedOutputOptions,OutputBundle) and relied on Vite-provided typing/context. - Updated the cross-origin HTML transform helper to type
bundleviaIndexHtmlTransformContext["bundle"]and made bundle access null-safe. - Refactored the shared
.config/vite.config.tsto useimport.meta.dirnameand simplifiedpath.resolve(...)calls, while inlining Rollup output options.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/app-shell-vite-plugin/src/vite-importmap-plugin.ts | Drops direct Rollup output-options type import while keeping the same generateBundle behavior. |
| packages/app-shell-vite-plugin/src/vite-crossorigin-fix-plugin.ts | Replaces Rollup bundle type with Vite’s IndexHtmlTransformContext bundle typing and adds optional bundle access. |
| packages/app-shell-vite-plugin/src/vite-configuration-processor-plugin.ts | Removes Rollup and Vite config type annotations from hook signatures without changing logic. |
| .config/vite.config.ts | Migrates from computed __dirname to import.meta.dirname and consolidates Rollup output config inline. |
dcleao
approved these changes
May 12, 2026
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.
rollup-specific imports (just types, no impact)__dirnametoimport.meta.dirname