import { Plugin } from 'vite'; import { CompilerContext } from '../context/index.ts'; /** * A pipeline of transformers for .tsx files. * Only .tsx files are touched as all transformations deal with components and * components should be defined in .tsx files. * * Instead of having separate transform() vite plugins, and each plugin having * to generate a source map (or forgetting to do so and breaking DX) and then * having Vite merge those source maps (Vite's source map merging can loose * precision), the pipeline is just a list of TypeScript transformers * efficiently applied one after another. * * And at the end, TypeScript will generate the source map for us - it does it * in a smart way - if we re-use the original typescript node during * transformation, then that node has original position information attached to * it - thus, even if transformer moves things around a lot, TypeScript can * still create a great source map. */ export declare const componentTransformPipeline: (context: CompilerContext) => Plugin;