File tree Expand file tree Collapse file tree
packages/bundler-plugins/src/rollup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ import type {
2020} from '../core/component-annotation-vite' ;
2121import type { SourceMap } from 'magic-string' ;
2222import MagicString from 'magic-string' ;
23- import type { TransformResult } from 'rollup' ;
2423import * as path from 'node:path' ;
2524import { createRequire } from 'node:module' ;
2625
26+ // The subset of Rollup's `TransformResult` that this plugin's `transform`
27+ // hook actually returns. Defined locally instead of imported from `rollup`
28+ // because `rollup` is an optional dependency.
29+ type TransformResult = { code : string ; map ?: SourceMap | string | { mappings : string } | null } | null | undefined ;
30+
2731type ViteModule = {
2832 parseAstAsync ?: ( code : string , options : { lang : 'jsx' | 'tsx' } ) => Promise < unknown > ;
2933} ;
You can’t perform that action at this time.
0 commit comments