Skip to content

Commit

Permalink
chore: export type
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 24, 2021
1 parent a198990 commit 46bb853
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export type {
HtmlTagDescriptor
} from './plugins/html'
export type { CSSOptions, CSSModulesOptions } from './plugins/css'
export type { ESBuildOptions, EsbuildTransformResult } from './plugins/esbuild'
export type { JsonOptions } from './plugins/json'
export type { ESBuildOptions, ESBuildTransformResult } from './plugins/esbuild'
export type { PackageData } from './plugins/resolve'
export type { WebSocketServer } from './server/ws'
export type { PluginContainer } from './server/pluginContainer'
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function stopService() {
}
}

export type EsbuildTransformResult = Omit<TransformResult, 'map'> & {
export type ESBuildTransformResult = Omit<TransformResult, 'map'> & {
map: SourceMap
}

Expand All @@ -49,7 +49,7 @@ export async function transformWithEsbuild(
filename: string,
options?: TransformOptions,
inMap?: object
): Promise<EsbuildTransformResult> {
): Promise<ESBuildTransformResult> {
const service = await ensureService()
// if the id ends with a valid ext, use it (e.g. vue blocks)
// otherwise, cleanup the query before checking the ext
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { TransformResult } from 'rollup'
import { TransformOptions, transformRequest } from './transformRequest'
import {
transformWithEsbuild,
EsbuildTransformResult
ESBuildTransformResult
} from '../plugins/esbuild'
import { TransformOptions as EsbuildTransformOptions } from 'esbuild'
import { DepOptimizationMetadata, optimizeDeps } from '../optimizer'
Expand Down Expand Up @@ -197,7 +197,7 @@ export interface ViteDevServer {
filename: string,
options?: EsbuildTransformOptions,
inMap?: object
): Promise<EsbuildTransformResult>
): Promise<ESBuildTransformResult>
/**
* Load a given URL as an instantiated module for SSR.
* @alpha
Expand Down

0 comments on commit 46bb853

Please sign in to comment.