forked from stenciljs/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbundle-interface.ts
More file actions
63 lines (60 loc) · 2.16 KB
/
Copy pathbundle-interface.ts
File metadata and controls
63 lines (60 loc) · 2.16 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import type { PreserveEntrySignaturesOption } from 'rollup';
import type { SourceFile, TransformerFactory } from 'typescript';
import type { BuildConditionals } from '../../declarations';
/**
* Options for bundled output passed on Rollup
*
* This covers the ID for the bundle, the platform it runs on, input modules,
* and more
*/
export interface BundleOptions {
id: string;
conditionals?: BuildConditionals;
/**
* When `true`, all `@stencil/core/*` packages will be treated as external
* and omitted from the generated bundle.
*/
externalRuntime?: boolean;
platform: BundlePlatform;
/**
* A collection of TypeScript transformation factories to apply during the "before" stage of the TypeScript
* compilation pipeline (before built-in .js transformations)
*/
customBeforeTransformers?: TransformerFactory<SourceFile>[];
/**
* This is equivalent to the Rollup `input` configuration option. It's
* an object mapping names to entry points which tells Rollup to bundle
* each thing up as a separate output chunk.
*
* @see {@link https://rollupjs.org/guide/en/#input}
*/
inputs: { [entryKey: string]: string };
/**
* A map of strings which are passed to the Stencil-specific loader plugin
* which we use to resolve the imports of Stencil project files when building
* with Rollup.
*
* @see {@link loader-plugin:loaderPlugin}
*/
loader?: { [id: string]: string };
/**
* Duplicate of Rollup's `inlineDynamicImports` output option.
*
* Creates dynamic imports (i.e. `import()` calls) as a part of the same
* chunk being bundled. Rather than being created as separate chunks.
*
* @see {@link https://rollupjs.org/guide/en/#outputinlinedynamicimports}
*/
inlineDynamicImports?: boolean;
inlineWorkers?: boolean;
/**
* Duplicate of Rollup's `preserveEntrySignatures` option.
*
* "Controls if Rollup tries to ensure that entry chunks have the same
* exports as the underlying entry module."
*
* @see {@link https://rollupjs.org/guide/en/#preserveentrysignatures}
*/
preserveEntrySignatures?: PreserveEntrySignaturesOption;
}
export type BundlePlatform = 'client' | 'hydrate' | 'worker';