mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
fix: types
This commit is contained in:
parent
371f7a02a7
commit
82111bfb41
@ -28,6 +28,7 @@ export { fetchModule, type FetchModuleOptions } from './ssr/fetchModule'
|
||||
export { createServerModuleRunner } from './ssr/runtime/serverModuleRunner'
|
||||
export { ServerHMRConnector } from './ssr/runtime/serverHmrConnector'
|
||||
export { ssrTransform as moduleRunnerTransform } from './ssr/ssrTransform'
|
||||
export type { ModuleRunnerTransformOptions } from './ssr/ssrTransform'
|
||||
|
||||
export * from './publicUtils'
|
||||
|
||||
|
@ -26,7 +26,7 @@ type Node = _Node & {
|
||||
end: number
|
||||
}
|
||||
|
||||
interface TransformOptions {
|
||||
export interface ModuleRunnerTransformOptions {
|
||||
json?: {
|
||||
stringify?: boolean
|
||||
}
|
||||
@ -47,7 +47,7 @@ export async function ssrTransform(
|
||||
inMap: SourceMap | { mappings: '' } | null,
|
||||
url: string,
|
||||
originalCode: string,
|
||||
options?: TransformOptions,
|
||||
options?: ModuleRunnerTransformOptions, // TODO: Should we export two functions instead of using options here?
|
||||
): Promise<TransformResult | null> {
|
||||
if (options?.json?.stringify && isJSONRequest(url)) {
|
||||
return ssrTransformJSON(code, inMap)
|
||||
|
Loading…
Reference in New Issue
Block a user