-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
index.ts
35 lines (32 loc) · 925 Bytes
/
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
import { Bundle as MagicStringBundle } from 'magic-string';
import { ChunkDependencies, ChunkExports } from '../Chunk';
import Graph from '../Graph';
import { OutputOptions } from '../rollup/types';
import amd from './amd';
import cjs from './cjs';
import esm from './esm';
import iife from './iife';
import system from './system';
import umd from './umd';
export interface FinaliserOptions {
indentString: string;
namedExportsMode: boolean;
hasExports: boolean;
intro: string;
outro: string;
dynamicImport: boolean;
needsAmdModule: boolean;
dependencies: ChunkDependencies;
exports: ChunkExports;
graph: Graph;
isEntryModuleFacade: boolean;
usesTopLevelAwait: boolean;
}
export type Finaliser = (
magicString: MagicStringBundle,
finaliserOptions: FinaliserOptions,
options: OutputOptions
) => MagicStringBundle;
export default { system, amd, cjs, es: esm, iife, umd } as {
[format: string]: Finaliser;
};