Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed Sep 17, 2024
1 parent 76adabc commit 0107805
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 48 deletions.
2 changes: 1 addition & 1 deletion docs/guide/api-vite-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The two main methods that runtime exposes are `executeUrl` and `executeEntrypoin
**Example Usage:**

```js
import { ViteRuntime, ESModulesRunner } from 'vite/runtime'
import { ViteRuntime, ESModulesRunner } from 'rolldown-vite/runtime'
import { root, fetchModule } from './rpc-implementation.js'

const runtime = new ViteRuntime(
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"tsx": "^4.17.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.1.0",
"vite": "workspace:*",
"rolldown-vite": "workspace:*",
"vitest": "^2.0.5"
},
"simple-git-hooks": {
Expand All @@ -98,7 +98,7 @@
"packageManager": "[email protected]",
"pnpm": {
"overrides": {
"vite": "workspace:*"
"rolldown-vite": "workspace:*"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
"acorn": "^8.12.1",
"picocolors": "^1.0.1",
"unbuild": "^2.0.0",
"vite": "workspace:*"
"rolldown-vite": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite",
"version": "5.4.2",
"name": "rolldown-vite",
"version": "0.3.1",
"type": "module",
"license": "MIT",
"author": "Evan You",
Expand Down
1 change: 1 addition & 0 deletions packages/vite/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const nodeConfig = defineConfig({
},
external: [
/^vite\//,
/^rolldown-vite\//,
'fsevents',
'lightningcss',
'rollup/parseAst',
Expand Down
2 changes: 2 additions & 0 deletions packages/vite/rollup.dts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const pkg = JSON.parse(
const external = [
/^node:*/,
/^vite\//,
/^rolldown-vite\//,
'rollup/parseAst',
...Object.keys(pkg.dependencies),
// lightningcss types are bundled
Expand Down Expand Up @@ -138,6 +139,7 @@ function validateChunkImports(this: PluginContext, chunk: RenderedChunk) {
!id.startsWith('node:') &&
!id.startsWith('types.d') &&
!id.startsWith('vite/') &&
!id.startsWith('rolldown-vite/') &&
!deps.includes(id) &&
!deps.some((name) => id.startsWith(name + '/'))
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect } from 'vitest'
import type { ViteRuntime } from 'vite/runtime'
import type { ViteRuntime } from 'rolldown-vite/runtime'
import { createViteRuntimeTester, editFile, resolvePath } from './utils'

describe('vite-runtime initialization', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/runtime/__tests__/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import type { TestAPI } from 'vitest'
import { afterEach, beforeEach, test } from 'vitest'
import type { ViteRuntime } from 'vite/runtime'
import type { ViteRuntime } from 'rolldown-vite/runtime'
import type { MainThreadRuntimeOptions } from '../mainThreadRuntime'
import type { ViteDevServer } from '../../../server'
import type { InlineConfig } from '../../../config'
Expand Down
3 changes: 2 additions & 1 deletion packages/vite/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"noImplicitOverride": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"useUnknownInCatchVariables": false
"useUnknownInCatchVariables": false,
"rootDir": "."
}
}
2 changes: 1 addition & 1 deletion playground/external/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"slash3": "npm:slash@^3.0.0",
"slash5": "npm:slash@^5.1.0",
"vite": "workspace:*",
"rolldown-vite": "workspace:*",
"vue": "^3.4.38",
"vue32": "npm:vue@~3.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion playground/hmr-ssr/__tests__/hmr-ssr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import EventEmitter from 'node:events'
import { afterAll, beforeAll, describe, expect, test, vi } from 'vitest'
import type { InlineConfig, Logger, ViteDevServer } from 'vite'
import { createServer, createViteRuntime } from 'vite'
import type { ViteRuntime } from 'vite/runtime'
import type { ViteRuntime } from 'rolldown-vite/runtime'
import type { RollupError } from 'rollup'
import {
addFile,
Expand Down
2 changes: 1 addition & 1 deletion playground/legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "workspace:*",
"rolldown-vite": "workspace:*",
"@vitejs/plugin-legacy": "workspace:*",
"express": "^4.19.2",
"terser": "^5.31.6"
Expand Down
Loading

0 comments on commit 0107805

Please sign in to comment.