rollup 2.18.1 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +131 -99
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.d.ts +24 -22
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +131 -99
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +2 -2
package/dist/rollup.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export interface SourceDescription {
|
|
|
89
89
|
ast?: AcornNode;
|
|
90
90
|
code: string;
|
|
91
91
|
map?: SourceMapInput;
|
|
92
|
-
moduleSideEffects?: boolean | null;
|
|
92
|
+
moduleSideEffects?: boolean | 'no-treeshake' | null;
|
|
93
93
|
syntheticNamedExports?: boolean;
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -98,7 +98,7 @@ export interface TransformModuleJSON {
|
|
|
98
98
|
code: string;
|
|
99
99
|
// note if plugins use new this.cache to opt-out auto transform cache
|
|
100
100
|
customTransformCache: boolean;
|
|
101
|
-
moduleSideEffects: boolean | null;
|
|
101
|
+
moduleSideEffects: boolean | 'no-treeshake' | null;
|
|
102
102
|
originalCode: string;
|
|
103
103
|
originalSourcemap: ExistingDecodedSourceMap | null;
|
|
104
104
|
resolvedIds?: ResolvedIdMap;
|
|
@@ -154,7 +154,7 @@ export type EmitFile = (emittedFile: EmittedFile) => string;
|
|
|
154
154
|
interface ModuleInfo {
|
|
155
155
|
dynamicallyImportedIds: string[];
|
|
156
156
|
dynamicImporters: string[];
|
|
157
|
-
hasModuleSideEffects: boolean;
|
|
157
|
+
hasModuleSideEffects: boolean | 'no-treeshake';
|
|
158
158
|
id: string;
|
|
159
159
|
implicitlyLoadedAfterOneOf: string[];
|
|
160
160
|
implicitlyLoadedBefore: string[];
|
|
@@ -206,7 +206,7 @@ export interface PluginContextMeta {
|
|
|
206
206
|
export interface ResolvedId {
|
|
207
207
|
external: boolean;
|
|
208
208
|
id: string;
|
|
209
|
-
moduleSideEffects: boolean;
|
|
209
|
+
moduleSideEffects: boolean | 'no-treeshake';
|
|
210
210
|
syntheticNamedExports: boolean;
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -217,7 +217,7 @@ export interface ResolvedIdMap {
|
|
|
217
217
|
interface PartialResolvedId {
|
|
218
218
|
external?: boolean;
|
|
219
219
|
id: string;
|
|
220
|
-
moduleSideEffects?: boolean | null;
|
|
220
|
+
moduleSideEffects?: boolean | 'no-treeshake' | null;
|
|
221
221
|
syntheticNamedExports?: boolean;
|
|
222
222
|
}
|
|
223
223
|
|
|
@@ -545,15 +545,15 @@ export interface OutputOptions {
|
|
|
545
545
|
define?: string;
|
|
546
546
|
id?: string;
|
|
547
547
|
};
|
|
548
|
-
assetFileNames?: string;
|
|
548
|
+
assetFileNames?: string | ((chunkInfo: PreRenderedAsset) => string);
|
|
549
549
|
banner?: string | (() => string | Promise<string>);
|
|
550
|
-
chunkFileNames?: string;
|
|
550
|
+
chunkFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
|
|
551
551
|
compact?: boolean;
|
|
552
552
|
// only required for bundle.write
|
|
553
553
|
dir?: string;
|
|
554
554
|
/** @deprecated Use the "renderDynamicImport" plugin hook instead. */
|
|
555
555
|
dynamicImportFunction?: string;
|
|
556
|
-
entryFileNames?: string;
|
|
556
|
+
entryFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
|
|
557
557
|
esModule?: boolean;
|
|
558
558
|
exports?: 'default' | 'named' | 'none' | 'auto';
|
|
559
559
|
extend?: boolean;
|
|
@@ -592,14 +592,14 @@ export interface NormalizedOutputOptions {
|
|
|
592
592
|
define: string;
|
|
593
593
|
id?: string;
|
|
594
594
|
};
|
|
595
|
-
assetFileNames: string;
|
|
595
|
+
assetFileNames: string | ((chunkInfo: PreRenderedAsset) => string);
|
|
596
596
|
banner: () => string | Promise<string>;
|
|
597
|
-
chunkFileNames: string;
|
|
597
|
+
chunkFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
|
|
598
598
|
compact: boolean;
|
|
599
599
|
dir: string | undefined;
|
|
600
600
|
/** @deprecated Use the "renderDynamicImport" plugin hook instead. */
|
|
601
601
|
dynamicImportFunction: string | undefined;
|
|
602
|
-
entryFileNames: string;
|
|
602
|
+
entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
|
|
603
603
|
esModule: boolean;
|
|
604
604
|
exports: 'default' | 'named' | 'none' | 'auto';
|
|
605
605
|
extend: boolean;
|
|
@@ -642,12 +642,16 @@ export interface SerializedTimings {
|
|
|
642
642
|
[label: string]: [number, number, number];
|
|
643
643
|
}
|
|
644
644
|
|
|
645
|
-
export interface
|
|
645
|
+
export interface PreRenderedAsset {
|
|
646
|
+
name: string | undefined;
|
|
647
|
+
source: string | Uint8Array;
|
|
648
|
+
type: 'asset';
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export interface OutputAsset extends PreRenderedAsset {
|
|
646
652
|
fileName: string;
|
|
647
653
|
/** @deprecated Accessing "isAsset" on files in the bundle is deprecated, please use "type === \'asset\'" instead */
|
|
648
654
|
isAsset: true;
|
|
649
|
-
source: string | Uint8Array;
|
|
650
|
-
type: 'asset';
|
|
651
655
|
}
|
|
652
656
|
|
|
653
657
|
export interface RenderedModule {
|
|
@@ -658,17 +662,11 @@ export interface RenderedModule {
|
|
|
658
662
|
}
|
|
659
663
|
|
|
660
664
|
export interface PreRenderedChunk {
|
|
661
|
-
code?: string;
|
|
662
|
-
dynamicImports: string[];
|
|
663
665
|
exports: string[];
|
|
664
666
|
facadeModuleId: string | null;
|
|
665
|
-
fileName?: string;
|
|
666
|
-
implicitlyLoadedBefore: string[];
|
|
667
|
-
imports: string[];
|
|
668
667
|
isDynamicEntry: boolean;
|
|
669
668
|
isEntry: boolean;
|
|
670
669
|
isImplicitEntry: boolean;
|
|
671
|
-
map?: SourceMap;
|
|
672
670
|
modules: {
|
|
673
671
|
[id: string]: RenderedModule;
|
|
674
672
|
};
|
|
@@ -677,13 +675,17 @@ export interface PreRenderedChunk {
|
|
|
677
675
|
}
|
|
678
676
|
|
|
679
677
|
export interface RenderedChunk extends PreRenderedChunk {
|
|
678
|
+
code?: string;
|
|
679
|
+
dynamicImports: string[];
|
|
680
680
|
fileName: string;
|
|
681
|
+
implicitlyLoadedBefore: string[];
|
|
682
|
+
imports: string[];
|
|
683
|
+
map?: SourceMap;
|
|
684
|
+
referencedFiles: string[];
|
|
681
685
|
}
|
|
682
686
|
|
|
683
687
|
export interface OutputChunk extends RenderedChunk {
|
|
684
688
|
code: string;
|
|
685
|
-
map?: SourceMap;
|
|
686
|
-
type: 'chunk';
|
|
687
689
|
}
|
|
688
690
|
|
|
689
691
|
export interface SerializablePluginCache {
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED