@@ -20,7 +20,6 @@ import type {
20
20
ServerQwikManifest ,
21
21
} from '../types' ;
22
22
import { createLinter , type QwikLinter } from './eslint-plugin' ;
23
- import type { LoadResult , OutputBundle , ResolveIdResult , TransformResult } from 'rollup' ;
24
23
import { isWin , parseId } from './vite-utils' ;
25
24
import type { BundleGraphAdder } from '..' ;
26
25
import { convertManifestToBundleGraph } from './bundle-graph' ;
@@ -465,7 +464,7 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
465
464
const parsedId = parseId ( id ) ;
466
465
const pathId = normalizePath ( parsedId . pathId ) ;
467
466
468
- let result : ResolveIdResult ;
467
+ let result : Rollup . ResolveIdResult ;
469
468
470
469
/** At this point, the request has been normalized. */
471
470
@@ -576,7 +575,7 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
576
575
ctx : Rollup . PluginContext ,
577
576
id : string ,
578
577
loadOpts ?: Parameters < Extract < Plugin [ 'load' ] , Function > > [ 1 ]
579
- ) : Promise < LoadResult > => {
578
+ ) : Promise < Rollup . LoadResult > => {
580
579
if ( id . startsWith ( '\0' ) || id . startsWith ( '/@fs/' ) ) {
581
580
return ;
582
581
}
@@ -641,8 +640,8 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
641
640
ctx : Rollup . PluginContext ,
642
641
code : string ,
643
642
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 > {
646
645
if ( id . startsWith ( '\0' ) ) {
647
646
return ;
648
647
}
@@ -787,7 +786,7 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
787
786
canonPath : ( p : string ) => string ;
788
787
} ;
789
788
790
- const createOutputAnalyzer = ( rollupBundle : OutputBundle ) => {
789
+ const createOutputAnalyzer = ( rollupBundle : Rollup . OutputBundle ) => {
791
790
const injections : GlobalInjections [ ] = [ ] ;
792
791
793
792
const outputAnalyzer : OutputAnalyzer = {
@@ -927,7 +926,10 @@ export const manifest = ${JSON.stringify(serverManifest)};\n`;
927
926
}
928
927
}
929
928
930
- function manualChunks ( id : string , { getModuleInfo } : Rollup . ManualChunkMeta ) {
929
+ function manualChunks (
930
+ id : string ,
931
+ { getModuleInfo } : Parameters < Extract < Rollup . OutputOptions [ 'manualChunks' ] , Function > > [ 1 ]
932
+ ) {
931
933
if ( opts . target === 'client' ) {
932
934
if (
933
935
// 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`;
956
958
957
959
async function generateManifest (
958
960
ctx : Rollup . PluginContext ,
959
- rollupBundle : OutputBundle ,
961
+ rollupBundle : Rollup . OutputBundle ,
960
962
bundleGraphAdders ?: Set < BundleGraphAdder > ,
961
963
manifestExtra ?: Partial < QwikManifest >
962
964
) {
0 commit comments