Skip to content

Commit 4c7856d

Browse files
committed
chore: use types from rolldown
1 parent 04de66f commit 4c7856d

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

packages/vite/src/node/build.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
ExternalOption,
66
InputOption,
77
InternalModuleFormat,
8-
// LogLevel,
8+
LogLevel,
99
// LogOrStringHandler,
1010
ModuleFormat,
1111
OutputBundle,
@@ -19,7 +19,7 @@ import type {
1919
RollupError,
2020
RollupLog,
2121
// RollupWatcher,
22-
// WarningHandlerWithDefault,
22+
WarningHandlerWithDefault,
2323
// WatcherOptions,
2424
} from 'rolldown'
2525
import {
@@ -88,15 +88,10 @@ import type { MinimalPluginContext, Plugin, PluginContext } from './plugin'
8888
import type { RollupPluginHooks } from './typeUtils'
8989

9090
// TODO: import from rolldown
91-
type LogLevel = 'info' | 'debug' | 'warn'
9291
type LogOrStringHandler = (
9392
level: LogLevel | 'error',
9493
log: RollupLog | string,
9594
) => void
96-
type WarningHandlerWithDefault = (
97-
warning: RollupLog,
98-
defaultHandler: import('rolldown').LoggingFunction,
99-
) => void
10095

10196
export interface BuildEnvironmentOptions {
10297
/**

packages/vite/src/node/server/pluginContainer.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import type {
4646
ParallelPluginHooks,
4747
PartialNull,
4848
PartialResolvedId,
49-
// PluginContextMeta,
49+
PluginContextMeta,
5050
ResolvedId,
5151
RollupError,
5252
RollupLog,
@@ -90,9 +90,6 @@ import type {
9090
EnvironmentModuleNode,
9191
} from './moduleGraph'
9292

93-
// TODO: import from rolldown
94-
type PluginContextMeta = RollupMinimalPluginContext['meta']
95-
9693
// same default value of "moduleInfo.meta" as in Rollup
9794
const EMPTY_OBJECT = Object.freeze({})
9895

0 commit comments

Comments
 (0)