@@ -20,7 +20,6 @@ import type {
2020 ServerQwikManifest ,
2121} from '../types' ;
2222import { createLinter , type QwikLinter } from './eslint-plugin' ;
23- import type { LoadResult , OutputBundle , ResolveIdResult , TransformResult } from 'rollup' ;
2423import { isWin , parseId } from './vite-utils' ;
2524import type { BundleGraphAdder } from '..' ;
2625import { convertManifestToBundleGraph } from './bundle-graph' ;
@@ -465,7 +464,7 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
465464 const parsedId = parseId ( id ) ;
466465 const pathId = normalizePath ( parsedId . pathId ) ;
467466
468- let result : ResolveIdResult ;
467+ let result : Rollup . ResolveIdResult ;
469468
470469 /** At this point, the request has been normalized. */
471470
@@ -576,7 +575,7 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
576575 ctx : Rollup . PluginContext ,
577576 id : string ,
578577 loadOpts ?: Parameters < Extract < Plugin [ 'load' ] , Function > > [ 1 ]
579- ) : Promise < LoadResult > => {
578+ ) : Promise < Rollup . LoadResult > => {
580579 if ( id . startsWith ( '\0' ) || id . startsWith ( '/@fs/' ) ) {
581580 return ;
582581 }
@@ -641,8 +640,8 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
641640 ctx : Rollup . PluginContext ,
642641 code : string ,
643642 id : string ,
644- transformOpts : Parameters < Extract < Plugin [ 'transform' ] , Function > > [ 2 ] = { }
645- ) : Promise < TransformResult > {
643+ transformOpts = { } as Parameters < Extract < Plugin [ 'transform' ] , Function > > [ 2 ]
644+ ) : Promise < Rollup . TransformResult > {
646645 if ( id . startsWith ( '\0' ) ) {
647646 return ;
648647 }
@@ -787,7 +786,7 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
787786 canonPath : ( p : string ) => string ;
788787 } ;
789788
790- const createOutputAnalyzer = ( rollupBundle : OutputBundle ) => {
789+ const createOutputAnalyzer = ( rollupBundle : Rollup . OutputBundle ) => {
791790 const injections : GlobalInjections [ ] = [ ] ;
792791
793792 const outputAnalyzer : OutputAnalyzer = {
@@ -927,7 +926,10 @@ export const manifest = ${JSON.stringify(serverManifest)};\n`;
927926 }
928927 }
929928
930- function manualChunks ( id : string , { getModuleInfo } : Rollup . ManualChunkMeta ) {
929+ function manualChunks (
930+ id : string ,
931+ { getModuleInfo } : Parameters < Extract < Rollup . OutputOptions [ 'manualChunks' ] , Function > > [ 1 ]
932+ ) {
931933 if ( opts . target === 'client' ) {
932934 if (
933935 // The preloader has to stay in a separate chunk if it's a client build
@@ -956,7 +958,7 @@ export const manifest = ${JSON.stringify(serverManifest)};\n`;
956958
957959 async function generateManifest (
958960 ctx : Rollup . PluginContext ,
959- rollupBundle : OutputBundle ,
961+ rollupBundle : Rollup . OutputBundle ,
960962 bundleGraphAdders ?: Set < BundleGraphAdder > ,
961963 manifestExtra ?: Partial < QwikManifest >
962964 ) {
0 commit comments