Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/core/BUNDLING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This is the most complex step, using the upstream `vite-rolldown.config` with mo

1. **Filter externals** - Bundles `picomatch`, `tinyglobby`, `fdir`, `rolldown`, `yaml` instead of keeping them external
2. **Add RewriteImportsPlugin** - Rewrites vite/rolldown imports at build time
3. **Rewrite static paths** - Fixes `VITE_PACKAGE_DIR`, `CLIENT_ENTRY`, `ENV_ENTRY` constants
3. **Rewrite static paths** - Fixes `VITE_PACKAGE_DIR`, `CLIENT_ENTRY`, `BUNDLED_DEV_CLIENT_ENTRY`, `ENV_ENTRY` constants
4. **Copy additional files** - `misc/`, `.d.ts` files, `types/`, `client.d.ts`

**Input**: `vite/packages/vite/`
Expand Down Expand Up @@ -219,6 +219,7 @@ dist/
│ │ ├── module-runner.js
│ │ └── chunks/
│ ├── client/
│ │ ├── bundledDevClient.mjs
│ │ ├── client.mjs
│ │ └── env.mjs
│ ├── misc/
Expand Down
7 changes: 7 additions & 0 deletions packages/core/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ async function buildVite() {
)`,
`export const CLIENT_ENTRY = path.join(VITE_PACKAGE_DIR, 'dist/vite/client/client.mjs')`,
);
magicString.replace(
`export const BUNDLED_DEV_CLIENT_ENTRY: string = resolve(
VITE_PACKAGE_DIR,
'dist/client/bundledDevClient.mjs',
)`,
`export const BUNDLED_DEV_CLIENT_ENTRY = path.join(VITE_PACKAGE_DIR, 'dist/vite/client/bundledDevClient.mjs')`,
);
magicString.replace(
`export const ENV_ENTRY: string = resolve(
VITE_PACKAGE_DIR,
Expand Down
Loading