Skip to content

Commit

Permalink
chore: use types from rolldown
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Feb 7, 2025
1 parent 512c795 commit 07af24a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
9 changes: 2 additions & 7 deletions packages/vite/src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
ExternalOption,
InputOption,
InternalModuleFormat,
// LogLevel,
LogLevel,
// LogOrStringHandler,
ModuleFormat,
OutputBundle,
Expand All @@ -19,7 +19,7 @@ import type {
RollupError,
RollupLog,
// RollupWatcher,
// WarningHandlerWithDefault,
WarningHandlerWithDefault,
// WatcherOptions,
} from 'rolldown'
import {
Expand Down Expand Up @@ -88,15 +88,10 @@ import type { MinimalPluginContext, Plugin, PluginContext } from './plugin'
import type { RollupPluginHooks } from './typeUtils'

// TODO: import from rolldown
type LogLevel = 'info' | 'debug' | 'warn'
type LogOrStringHandler = (
level: LogLevel | 'error',
log: RollupLog | string,
) => void
type WarningHandlerWithDefault = (
warning: RollupLog,
defaultHandler: import('rolldown').LoggingFunction,
) => void

export interface BuildEnvironmentOptions {
/**
Expand Down
5 changes: 1 addition & 4 deletions packages/vite/src/node/server/pluginContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import type {
ParallelPluginHooks,
PartialNull,
PartialResolvedId,
// PluginContextMeta,
PluginContextMeta,
ResolvedId,
RollupError,
RollupLog,
Expand Down Expand Up @@ -90,9 +90,6 @@ import type {
EnvironmentModuleNode,
} from './moduleGraph'

// TODO: import from rolldown
type PluginContextMeta = RollupMinimalPluginContext['meta']

// same default value of "moduleInfo.meta" as in Rollup
const EMPTY_OBJECT = Object.freeze({})

Expand Down

0 comments on commit 07af24a

Please sign in to comment.