forked from rollup/rollup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
38 lines (35 loc) · 1.04 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import type { Bundle as MagicStringBundle } from 'magic-string';
import type { ChunkDependency, ChunkExports } from '../Chunk';
import type { LogHandler, NormalizedOutputOptions } from '../rollup/types';
import type { GenerateCodeSnippets } from '../utils/generateCodeSnippets';
import amd from './amd';
import cjs from './cjs';
import es from './es';
import iife from './iife';
import system from './system';
import umd from './umd';
export interface FinaliserOptions {
accessedGlobals: Set<string>;
dependencies: ChunkDependency[];
exports: ChunkExports;
hasDefaultExport: boolean;
hasExports: boolean;
id: string;
indent: string;
intro: string;
isEntryFacade: boolean;
isModuleFacade: boolean;
log: LogHandler;
namedExportsMode: boolean;
outro: string;
snippets: GenerateCodeSnippets;
usesTopLevelAwait: boolean;
}
export type Finaliser = (
magicString: MagicStringBundle,
finaliserOptions: FinaliserOptions,
options: NormalizedOutputOptions
) => void;
export default { amd, cjs, es, iife, system, umd } as {
[format: string]: Finaliser;
};