@@ -11,12 +11,12 @@ import type {
1111 OutputChunk ,
1212 OutputOptions ,
1313 RenderedChunk ,
14+ RolldownBuild ,
15+ RolldownOptions ,
16+ RolldownOutput ,
1417 RolldownPlugin ,
15- RollupBuild ,
1618 RollupError ,
1719 RollupLog ,
18- RollupOptions ,
19- RollupOutput ,
2020 // RollupWatcher,
2121 // WatcherOptions,
2222} from 'rolldown'
@@ -187,7 +187,7 @@ export interface BuildEnvironmentOptions {
187187 * Will be merged with internal rollup options.
188188 * https://rollupjs.org/configuration-options/
189189 */
190- rollupOptions ?: RollupOptions
190+ rollupOptions ?: RolldownOptions
191191 /**
192192 * Options to pass on to `@rollup/plugin-commonjs`
193193 */
@@ -544,7 +544,7 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
544544 */
545545export async function build (
546546 inlineConfig : InlineConfig = { } ,
547- ) : Promise < RollupOutput | RollupOutput [ ] /* | RollupWatcher */ > {
547+ ) : Promise < RolldownOutput | RolldownOutput [ ] /* | RollupWatcher */ > {
548548 const builder = await createBuilder ( inlineConfig , true )
549549 const environment = Object . values ( builder . environments ) [ 0 ]
550550 if ( ! environment ) throw new Error ( 'No environment found' )
@@ -572,7 +572,7 @@ function resolveConfigToBuild(
572572 **/
573573async function buildEnvironment (
574574 environment : BuildEnvironment ,
575- ) : Promise < RollupOutput | RollupOutput [ ] /* | RollupWatcher */ > {
575+ ) : Promise < RolldownOutput | RolldownOutput [ ] /* | RollupWatcher */ > {
576576 const { root, packageCache } = environment . config
577577 const options = environment . config . build
578578 const libOptions = options . lib
@@ -632,7 +632,7 @@ async function buildEnvironment(
632632 injectEnvironmentToHooks ( environment , chunkMetadataMap , p ) ,
633633 )
634634
635- const rollupOptions : RollupOptions = {
635+ const rollupOptions : RolldownOptions = {
636636 // preserveEntrySignatures: ssr
637637 // ? 'allow-extension'
638638 // : libOptions
@@ -714,7 +714,7 @@ async function buildEnvironment(
714714 // logger.error(e.message, { error: e })
715715 // }
716716
717- let bundle : RollupBuild | undefined
717+ let bundle : RolldownBuild | undefined
718718 let startTime : number | undefined
719719 try {
720720 const buildOutputOptions = ( output : OutputOptions = { } ) : OutputOptions => {
@@ -862,7 +862,7 @@ async function buildEnvironment(
862862 prepareOutDir ( resolvedOutDirs , emptyOutDir , environment )
863863 }
864864
865- const res : RollupOutput [ ] = [ ]
865+ const res : RolldownOutput [ ] = [ ]
866866 for ( const output of normalizedOutputs ) {
867867 res . push ( await bundle [ options . write ? 'write' : 'generate' ] ( output ) )
868868 }
@@ -1553,7 +1553,7 @@ export interface ViteBuilder {
15531553 buildApp ( ) : Promise < void >
15541554 build (
15551555 environment : BuildEnvironment ,
1556- ) : Promise < RollupOutput | RollupOutput [ ] /* | RollupWatcher */ >
1556+ ) : Promise < RolldownOutput | RolldownOutput [ ] /* | RollupWatcher */ >
15571557}
15581558
15591559export interface BuilderOptions {
0 commit comments