rollup 4.64.8 → 4.64.10
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/dist/bin/rollup +3 -3
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +104 -54
- package/dist/es/shared/parseAst.js +2 -2
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/node-entry.js +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +104 -54
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +26 -26
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.64.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.64.10
|
|
5
|
+
Sun, 18 Oct 2026 14:44:08 GMT - commit 4ddbff578063396837db4e9901f77a70a6c526e6
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
|
@@ -27,7 +27,7 @@ require('node:perf_hooks');
|
|
|
27
27
|
require('node:url');
|
|
28
28
|
require('../getLogFilter.js');
|
|
29
29
|
|
|
30
|
-
const help = "rollup version 4.64.
|
|
30
|
+
const help = "rollup version 4.64.10\n=====================================\n\nUsage: rollup [options] <entry file>\n\nOptions:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, Rollup will try to load configuration files in\n the following order:\n rollup.config.mjs -> rollup.config.cjs -> rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAttributes Omit import attributes in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--filterLogs <filter> Filter log messages\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--forceExit Force exit the process when done\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--hashCharacters <name> Use the specified character set for file hashes\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--importAttributesKey <name> Use the specified keyword for import attributes\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-reexportProtoFromExternal Ignore `__proto__` in star re-exports\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemapDebugIds Emit unique debug ids in source and sourcemaps\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.allowInputInsideOutputPath Whether the input path is allowed to be a\n subpath of the output path\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @license
|
package/dist/es/getLogFilter.js
CHANGED
package/dist/es/parseAst.js
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.64.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.64.10
|
|
4
|
+
Sun, 18 Oct 2026 14:44:08 GMT - commit 4ddbff578063396837db4e9901f77a70a6c526e6
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ function _mergeNamespaces(n, m) {
|
|
|
27
27
|
return Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' });
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var version = "4.64.
|
|
30
|
+
var version = "4.64.10";
|
|
31
31
|
const pkg = {
|
|
32
32
|
version: version};
|
|
33
33
|
|
|
@@ -4297,6 +4297,18 @@ const PURE_WITH_ARRAY = {
|
|
|
4297
4297
|
return args.length > 1 && !(args[1] instanceof ArrayExpression);
|
|
4298
4298
|
}
|
|
4299
4299
|
};
|
|
4300
|
+
const PURE_WITH_ARRAY_OR_LENGTH = {
|
|
4301
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
4302
|
+
getLiteralValue: getUnknownValue,
|
|
4303
|
+
hasEffectsWhenCalled({ args }) {
|
|
4304
|
+
const [_thisArgument, firstArgument] = args;
|
|
4305
|
+
return (firstArgument !== undefined &&
|
|
4306
|
+
!(firstArgument instanceof ArrayExpression) &&
|
|
4307
|
+
typeof firstArgument.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, {
|
|
4308
|
+
deoptimizeCache: doNothing
|
|
4309
|
+
}) !== 'number');
|
|
4310
|
+
}
|
|
4311
|
+
};
|
|
4300
4312
|
const GETTER_ACCESS = {
|
|
4301
4313
|
deoptimizeArgumentsOnCall: doNothing,
|
|
4302
4314
|
getLiteralValue: getUnknownValue,
|
|
@@ -4355,7 +4367,7 @@ const PC_WITH_ARRAY = {
|
|
|
4355
4367
|
};
|
|
4356
4368
|
const ARRAY_TYPE = {
|
|
4357
4369
|
__proto__: null,
|
|
4358
|
-
[ValueProperties]:
|
|
4370
|
+
[ValueProperties]: PURE_WITH_ARRAY_OR_LENGTH,
|
|
4359
4371
|
from: O,
|
|
4360
4372
|
of: PF,
|
|
4361
4373
|
prototype: O
|
|
@@ -8661,7 +8673,7 @@ function getCompleteAmdId(options, chunkId) {
|
|
|
8661
8673
|
}
|
|
8662
8674
|
|
|
8663
8675
|
function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal, mechanism = 'return ') {
|
|
8664
|
-
const { _,
|
|
8676
|
+
const { _, getFunctionIntro, getPropertyAccess, n, s } = snippets;
|
|
8665
8677
|
if (!namedExportsMode) {
|
|
8666
8678
|
return `${n}${n}${mechanism}${getSingleDefaultExport(exports, dependencies, interop, externalLiveBindings, getPropertyAccess)};`;
|
|
8667
8679
|
}
|
|
@@ -8677,15 +8689,7 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
8677
8689
|
if (exportBlock)
|
|
8678
8690
|
exportBlock += n;
|
|
8679
8691
|
if (specifier.imported !== '*' && specifier.needsLiveBinding) {
|
|
8680
|
-
|
|
8681
|
-
functionReturn: true,
|
|
8682
|
-
lineBreakIndent: null,
|
|
8683
|
-
name: null
|
|
8684
|
-
});
|
|
8685
|
-
exportBlock +=
|
|
8686
|
-
`Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}{${n}` +
|
|
8687
|
-
`${t}enumerable:${_}true,${n}` +
|
|
8688
|
-
`${t}get:${_}${left}${importName}${right}${n}});`;
|
|
8692
|
+
exportBlock += `Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}${getGetter(importName, false, t, snippets)});`;
|
|
8689
8693
|
}
|
|
8690
8694
|
else if (specifier.reexported === '__proto__') {
|
|
8691
8695
|
exportBlock +=
|
|
@@ -8700,12 +8704,16 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
8700
8704
|
}
|
|
8701
8705
|
}
|
|
8702
8706
|
}
|
|
8703
|
-
for (const { exported, local } of exports) {
|
|
8707
|
+
for (const { exported, local, needsLiveBinding } of exports) {
|
|
8704
8708
|
const lhs = `exports${getPropertyAccess(exported)}`;
|
|
8705
8709
|
const rhs = local;
|
|
8706
8710
|
if (lhs !== rhs) {
|
|
8707
8711
|
if (exportBlock)
|
|
8708
8712
|
exportBlock += n;
|
|
8713
|
+
if (needsLiveBinding) {
|
|
8714
|
+
exportBlock += `Object.defineProperty(exports,${_}${JSON.stringify(exported)},${_}${getGetter(rhs, true, t, snippets)});`;
|
|
8715
|
+
continue;
|
|
8716
|
+
}
|
|
8709
8717
|
exportBlock +=
|
|
8710
8718
|
exported === '__proto__'
|
|
8711
8719
|
? `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
|
|
@@ -8807,19 +8815,27 @@ function getNamespaceMarkers(hasNamedExports, addEsModule, addNamespaceToStringT
|
|
|
8807
8815
|
}
|
|
8808
8816
|
return '';
|
|
8809
8817
|
}
|
|
8810
|
-
const getDefineProperty = (name, needsLiveBinding, t,
|
|
8818
|
+
const getDefineProperty = (name, needsLiveBinding, t, snippets) => {
|
|
8819
|
+
const { _ } = snippets;
|
|
8811
8820
|
if (needsLiveBinding) {
|
|
8812
|
-
|
|
8813
|
-
functionReturn: true,
|
|
8814
|
-
lineBreakIndent: null,
|
|
8815
|
-
name: null
|
|
8816
|
-
});
|
|
8817
|
-
return (`Object.defineProperty(exports,${_}k,${_}{${n}` +
|
|
8818
|
-
`${t}${t}enumerable:${_}true,${n}` +
|
|
8819
|
-
`${t}${t}get:${_}${left}${name}[k]${right}${n}${t}})`);
|
|
8821
|
+
return `Object.defineProperty(exports,${_}k,${_}${getGetter(`${name}[k]`, false, t, snippets, t)})`;
|
|
8820
8822
|
}
|
|
8821
8823
|
return `exports[k]${_}=${_}${name}[k]`;
|
|
8822
8824
|
};
|
|
8825
|
+
const getGetter = (expression, configurable, t, { getDirectReturnFunction, getObject }, base = '') => {
|
|
8826
|
+
const [left, right] = getDirectReturnFunction([], {
|
|
8827
|
+
functionReturn: true,
|
|
8828
|
+
lineBreakIndent: null,
|
|
8829
|
+
name: null
|
|
8830
|
+
});
|
|
8831
|
+
const fields = [
|
|
8832
|
+
['enumerable', 'true'],
|
|
8833
|
+
['get', `${left}${expression}${right}`]
|
|
8834
|
+
];
|
|
8835
|
+
if (configurable)
|
|
8836
|
+
fields.unshift(['configurable', 'true']);
|
|
8837
|
+
return getObject(fields, { lineBreakIndent: { base, t } });
|
|
8838
|
+
};
|
|
8823
8839
|
|
|
8824
8840
|
function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, indent, snippets) {
|
|
8825
8841
|
const { _, cnst, n } = snippets;
|
|
@@ -14446,19 +14462,17 @@ class JSXAttribute extends NodeBase {
|
|
|
14446
14462
|
}
|
|
14447
14463
|
if (value) {
|
|
14448
14464
|
code.overwrite(name.end, value.start, ': ', { contentOnly: true });
|
|
14449
|
-
// foo="aa \n aa"
|
|
14450
|
-
if (value instanceof Literal &&
|
|
14451
|
-
typeof value.value === 'string' &&
|
|
14452
|
-
value.value.includes('\n')) {
|
|
14453
|
-
code.overwrite(value.start, value.end, JSON.stringify(value.value), {
|
|
14454
|
-
contentOnly: true
|
|
14455
|
-
});
|
|
14456
|
-
}
|
|
14457
14465
|
}
|
|
14458
14466
|
else {
|
|
14459
14467
|
code.appendLeft(name.end, ': true');
|
|
14460
14468
|
}
|
|
14461
14469
|
}
|
|
14470
|
+
// JSX strings contain HTML entities but no escape sequences
|
|
14471
|
+
if (value instanceof Literal && typeof value.value === 'string') {
|
|
14472
|
+
code.overwrite(value.start, value.end, JSON.stringify(value.value), {
|
|
14473
|
+
contentOnly: true
|
|
14474
|
+
});
|
|
14475
|
+
}
|
|
14462
14476
|
}
|
|
14463
14477
|
}
|
|
14464
14478
|
}
|
|
@@ -19726,7 +19740,8 @@ class Chunk {
|
|
|
19726
19740
|
exported: exportName,
|
|
19727
19741
|
expression,
|
|
19728
19742
|
hoisted,
|
|
19729
|
-
local
|
|
19743
|
+
local,
|
|
19744
|
+
needsLiveBinding: variable.isReassigned && this.exportNamesByVariable.get(variable).length > 1
|
|
19730
19745
|
});
|
|
19731
19746
|
}
|
|
19732
19747
|
return exports;
|
|
@@ -20404,7 +20419,8 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
20404
20419
|
const { entriesAndManualChunksCount, dependentEntriesByModule, dynamicallyDependentEntriesByDynamicEntry, dynamicImportsByEntry, dynamicallyDependentEntriesByAwaitedDynamicEntry, awaitedDynamicImportsByEntry } = analyzeModuleGraph(entries, manualChunkModules, manualChunkModulesByModule);
|
|
20405
20420
|
// Each chunk is identified by its position in this array
|
|
20406
20421
|
const chunkAtoms = getChunksWithSameDependentEntries(getModulesWithDependentEntriesAndHandleTLACycles(dependentEntriesByModule, manualChunkModulesByModule, chunkDefinitions));
|
|
20407
|
-
const
|
|
20422
|
+
const manualChunkAtoms = getManualChunkAtoms(manualChunkModules, dependentEntriesByModule);
|
|
20423
|
+
const staticDependencyAtomsByEntry = getStaticDependencyAtomsByEntry(entriesAndManualChunksCount, concatLazy([chunkAtoms, manualChunkAtoms]));
|
|
20408
20424
|
// Warning: This will consume dynamicallyDependentEntriesByDynamicEntry.
|
|
20409
20425
|
// If we no longer want this, we should make a copy here.
|
|
20410
20426
|
const alreadyLoadedAtomsByEntry = getAlreadyLoadedAtomsByEntry(staticDependencyAtomsByEntry, dynamicallyDependentEntriesByDynamicEntry, dynamicImportsByEntry, entriesAndManualChunksCount);
|
|
@@ -20412,7 +20428,7 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
20412
20428
|
const awaitedAlreadyLoadedAtomsByEntry = getAwaitedAlreadyLoadedAtomsByEntry(staticDependencyAtomsByEntry, dynamicallyDependentEntriesByAwaitedDynamicEntry, awaitedDynamicImportsByEntry, entriesAndManualChunksCount);
|
|
20413
20429
|
// This mutates the dependentEntries in chunkAtoms
|
|
20414
20430
|
removeUnnecessaryDependentEntries(chunkAtoms, alreadyLoadedAtomsByEntry, awaitedAlreadyLoadedAtomsByEntry);
|
|
20415
|
-
const { chunks, sideEffectAtoms, sizeByAtom } = getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize);
|
|
20431
|
+
const { chunks, sideEffectAtoms, sizeByAtom } = getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, manualChunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize);
|
|
20416
20432
|
chunkDefinitions.push(...getOptimizedChunks(chunks, minChunkSize, sideEffectAtoms, sizeByAtom, log).map(({ modules }) => ({
|
|
20417
20433
|
alias: null,
|
|
20418
20434
|
modules
|
|
@@ -20633,6 +20649,12 @@ function* getModulesWithDependentEntriesAndHandleTLACycles(dependentEntriesByMod
|
|
|
20633
20649
|
}
|
|
20634
20650
|
}
|
|
20635
20651
|
}
|
|
20652
|
+
function getManualChunkAtoms(manualChunkModules, dependentEntriesByModule) {
|
|
20653
|
+
return manualChunkModules.map(modules => ({
|
|
20654
|
+
dependentEntries: dependentEntriesByModule.get(modules[0]),
|
|
20655
|
+
modules
|
|
20656
|
+
}));
|
|
20657
|
+
}
|
|
20636
20658
|
function getStaticDependencyAtomsByEntry(entriesAndManualChunksCount, chunkAtoms) {
|
|
20637
20659
|
// The indices correspond to the indices in allEntries. The atoms correspond
|
|
20638
20660
|
// to bits in the bigint values where chunk 0 is the lowest bit.
|
|
@@ -20724,10 +20746,10 @@ function removeUnnecessaryDependentEntries(chunkAtoms, alreadyLoadedAtomsByEntry
|
|
|
20724
20746
|
chunkMask <<= 1n;
|
|
20725
20747
|
}
|
|
20726
20748
|
}
|
|
20727
|
-
function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize) {
|
|
20749
|
+
function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, manualChunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize) {
|
|
20728
20750
|
const chunksBySignature = Object.create(null);
|
|
20729
20751
|
const chunkByModule = new Map();
|
|
20730
|
-
const sizeByAtom = new Array(chunkAtoms.length);
|
|
20752
|
+
const sizeByAtom = new Array(chunkAtoms.length + manualChunkAtoms.length);
|
|
20731
20753
|
let sideEffectAtoms = 0n;
|
|
20732
20754
|
let atomMask = 1n;
|
|
20733
20755
|
let index = 0;
|
|
@@ -20752,34 +20774,54 @@ function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticD
|
|
|
20752
20774
|
pure: true,
|
|
20753
20775
|
size: 0
|
|
20754
20776
|
});
|
|
20755
|
-
let atomSize = 0;
|
|
20756
|
-
let pure = true;
|
|
20757
20777
|
for (const module of modules) {
|
|
20758
20778
|
chunkByModule.set(module, chunk);
|
|
20759
|
-
// Unfortunately, we cannot take tree-shaking into account here because
|
|
20760
|
-
// rendering did not happen yet, but we can detect empty modules
|
|
20761
|
-
if (module.isIncluded()) {
|
|
20762
|
-
pure &&= !module.hasEffects();
|
|
20763
|
-
// we use a trivial size for the default minChunkSize to improve
|
|
20764
|
-
// performance
|
|
20765
|
-
atomSize += minChunkSize > 1 ? module.estimateSize() : 1;
|
|
20766
|
-
}
|
|
20767
20779
|
}
|
|
20780
|
+
const { pure, size } = getAtomPurityAndSize(modules, minChunkSize);
|
|
20768
20781
|
if (!pure) {
|
|
20769
20782
|
sideEffectAtoms |= atomMask;
|
|
20770
20783
|
}
|
|
20771
|
-
sizeByAtom[index++] =
|
|
20784
|
+
sizeByAtom[index++] = size;
|
|
20772
20785
|
chunk.containedAtoms |= atomMask;
|
|
20773
20786
|
chunk.modules.push(...modules);
|
|
20774
20787
|
chunk.pure &&= pure;
|
|
20775
|
-
chunk.size +=
|
|
20788
|
+
chunk.size += size;
|
|
20789
|
+
atomMask <<= 1n;
|
|
20790
|
+
}
|
|
20791
|
+
// Manual chunks are not merged, but chunks importing them need to know
|
|
20792
|
+
// their size and side effects
|
|
20793
|
+
const manualChunkAtomByModule = new Map();
|
|
20794
|
+
for (const { modules } of manualChunkAtoms) {
|
|
20795
|
+
for (const module of modules) {
|
|
20796
|
+
manualChunkAtomByModule.set(module, atomMask);
|
|
20797
|
+
}
|
|
20798
|
+
const { pure, size } = getAtomPurityAndSize(modules, minChunkSize);
|
|
20799
|
+
if (!pure) {
|
|
20800
|
+
sideEffectAtoms |= atomMask;
|
|
20801
|
+
}
|
|
20802
|
+
sizeByAtom[index++] = size;
|
|
20776
20803
|
atomMask <<= 1n;
|
|
20777
20804
|
}
|
|
20778
20805
|
const chunks = Object.values(chunksBySignature);
|
|
20779
|
-
sideEffectAtoms |= addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule, atomMask);
|
|
20806
|
+
sideEffectAtoms |= addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule, manualChunkAtomByModule, atomMask);
|
|
20780
20807
|
return { chunks, sideEffectAtoms, sizeByAtom };
|
|
20781
20808
|
}
|
|
20782
|
-
function
|
|
20809
|
+
function getAtomPurityAndSize(modules, minChunkSize) {
|
|
20810
|
+
let pure = true;
|
|
20811
|
+
let size = 0;
|
|
20812
|
+
for (const module of modules) {
|
|
20813
|
+
// Unfortunately, we cannot take tree-shaking into account here because
|
|
20814
|
+
// rendering did not happen yet, but we can detect empty modules
|
|
20815
|
+
if (module.isIncluded()) {
|
|
20816
|
+
pure &&= !module.hasEffects();
|
|
20817
|
+
// we use a trivial size for the default minChunkSize to improve
|
|
20818
|
+
// performance
|
|
20819
|
+
size += minChunkSize > 1 ? module.estimateSize() : 1;
|
|
20820
|
+
}
|
|
20821
|
+
}
|
|
20822
|
+
return { pure, size };
|
|
20823
|
+
}
|
|
20824
|
+
function addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule, manualChunkAtomByModule, nextAvailableAtomMask) {
|
|
20783
20825
|
const signatureByExternalModule = new Map();
|
|
20784
20826
|
let externalSideEffectAtoms = 0n;
|
|
20785
20827
|
for (const chunk of chunks) {
|
|
@@ -20800,9 +20842,17 @@ function addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule
|
|
|
20800
20842
|
}
|
|
20801
20843
|
else {
|
|
20802
20844
|
const dependencyChunk = chunkByModule.get(dependency);
|
|
20803
|
-
if (dependencyChunk
|
|
20804
|
-
|
|
20805
|
-
|
|
20845
|
+
if (dependencyChunk) {
|
|
20846
|
+
if (dependencyChunk !== chunk) {
|
|
20847
|
+
dependencies.add(dependencyChunk);
|
|
20848
|
+
dependencyChunk.dependentChunks.add(chunk);
|
|
20849
|
+
}
|
|
20850
|
+
}
|
|
20851
|
+
else {
|
|
20852
|
+
const manualChunkAtom = manualChunkAtomByModule.get(dependency);
|
|
20853
|
+
if (manualChunkAtom) {
|
|
20854
|
+
chunk.containedAtoms |= manualChunkAtom;
|
|
20855
|
+
}
|
|
20806
20856
|
}
|
|
20807
20857
|
}
|
|
20808
20858
|
}
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/parseAst.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.64.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.64.10
|
|
4
|
+
Sun, 18 Oct 2026 14:44:08 GMT - commit 4ddbff578063396837db4e9901f77a70a6c526e6
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -42,7 +42,7 @@ function _mergeNamespaces(n, m) {
|
|
|
42
42
|
|
|
43
43
|
const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises);
|
|
44
44
|
|
|
45
|
-
var version = "4.64.
|
|
45
|
+
var version = "4.64.10";
|
|
46
46
|
const package_ = {
|
|
47
47
|
version: version};
|
|
48
48
|
|
|
@@ -8469,6 +8469,18 @@ const PURE_WITH_ARRAY = {
|
|
|
8469
8469
|
return args.length > 1 && !(args[1] instanceof ArrayExpression);
|
|
8470
8470
|
}
|
|
8471
8471
|
};
|
|
8472
|
+
const PURE_WITH_ARRAY_OR_LENGTH = {
|
|
8473
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
8474
|
+
getLiteralValue: getUnknownValue,
|
|
8475
|
+
hasEffectsWhenCalled({ args }) {
|
|
8476
|
+
const [_thisArgument, firstArgument] = args;
|
|
8477
|
+
return (firstArgument !== undefined &&
|
|
8478
|
+
!(firstArgument instanceof ArrayExpression) &&
|
|
8479
|
+
typeof firstArgument.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, {
|
|
8480
|
+
deoptimizeCache: doNothing
|
|
8481
|
+
}) !== 'number');
|
|
8482
|
+
}
|
|
8483
|
+
};
|
|
8472
8484
|
const GETTER_ACCESS = {
|
|
8473
8485
|
deoptimizeArgumentsOnCall: doNothing,
|
|
8474
8486
|
getLiteralValue: getUnknownValue,
|
|
@@ -8527,7 +8539,7 @@ const PC_WITH_ARRAY = {
|
|
|
8527
8539
|
};
|
|
8528
8540
|
const ARRAY_TYPE = {
|
|
8529
8541
|
__proto__: null,
|
|
8530
|
-
[ValueProperties]:
|
|
8542
|
+
[ValueProperties]: PURE_WITH_ARRAY_OR_LENGTH,
|
|
8531
8543
|
from: O,
|
|
8532
8544
|
of: PF,
|
|
8533
8545
|
prototype: O
|
|
@@ -12821,7 +12833,7 @@ function getCompleteAmdId(options, chunkId) {
|
|
|
12821
12833
|
}
|
|
12822
12834
|
|
|
12823
12835
|
function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snippets, t, externalLiveBindings, reexportProtoFromExternal, mechanism = 'return ') {
|
|
12824
|
-
const { _,
|
|
12836
|
+
const { _, getFunctionIntro, getPropertyAccess, n, s } = snippets;
|
|
12825
12837
|
if (!namedExportsMode) {
|
|
12826
12838
|
return `${n}${n}${mechanism}${getSingleDefaultExport(exports, dependencies, interop, externalLiveBindings, getPropertyAccess)};`;
|
|
12827
12839
|
}
|
|
@@ -12837,15 +12849,7 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
12837
12849
|
if (exportBlock)
|
|
12838
12850
|
exportBlock += n;
|
|
12839
12851
|
if (specifier.imported !== '*' && specifier.needsLiveBinding) {
|
|
12840
|
-
|
|
12841
|
-
functionReturn: true,
|
|
12842
|
-
lineBreakIndent: null,
|
|
12843
|
-
name: null
|
|
12844
|
-
});
|
|
12845
|
-
exportBlock +=
|
|
12846
|
-
`Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}{${n}` +
|
|
12847
|
-
`${t}enumerable:${_}true,${n}` +
|
|
12848
|
-
`${t}get:${_}${left}${importName}${right}${n}});`;
|
|
12852
|
+
exportBlock += `Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}${getGetter(importName, false, t, snippets)});`;
|
|
12849
12853
|
}
|
|
12850
12854
|
else if (specifier.reexported === '__proto__') {
|
|
12851
12855
|
exportBlock +=
|
|
@@ -12860,12 +12864,16 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
12860
12864
|
}
|
|
12861
12865
|
}
|
|
12862
12866
|
}
|
|
12863
|
-
for (const { exported, local } of exports) {
|
|
12867
|
+
for (const { exported, local, needsLiveBinding } of exports) {
|
|
12864
12868
|
const lhs = `exports${getPropertyAccess(exported)}`;
|
|
12865
12869
|
const rhs = local;
|
|
12866
12870
|
if (lhs !== rhs) {
|
|
12867
12871
|
if (exportBlock)
|
|
12868
12872
|
exportBlock += n;
|
|
12873
|
+
if (needsLiveBinding) {
|
|
12874
|
+
exportBlock += `Object.defineProperty(exports,${_}${JSON.stringify(exported)},${_}${getGetter(rhs, true, t, snippets)});`;
|
|
12875
|
+
continue;
|
|
12876
|
+
}
|
|
12869
12877
|
exportBlock +=
|
|
12870
12878
|
exported === '__proto__'
|
|
12871
12879
|
? `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` +
|
|
@@ -12967,19 +12975,27 @@ function getNamespaceMarkers(hasNamedExports, addEsModule, addNamespaceToStringT
|
|
|
12967
12975
|
}
|
|
12968
12976
|
return '';
|
|
12969
12977
|
}
|
|
12970
|
-
const getDefineProperty = (name, needsLiveBinding, t,
|
|
12978
|
+
const getDefineProperty = (name, needsLiveBinding, t, snippets) => {
|
|
12979
|
+
const { _ } = snippets;
|
|
12971
12980
|
if (needsLiveBinding) {
|
|
12972
|
-
|
|
12973
|
-
functionReturn: true,
|
|
12974
|
-
lineBreakIndent: null,
|
|
12975
|
-
name: null
|
|
12976
|
-
});
|
|
12977
|
-
return (`Object.defineProperty(exports,${_}k,${_}{${n}` +
|
|
12978
|
-
`${t}${t}enumerable:${_}true,${n}` +
|
|
12979
|
-
`${t}${t}get:${_}${left}${name}[k]${right}${n}${t}})`);
|
|
12981
|
+
return `Object.defineProperty(exports,${_}k,${_}${getGetter(`${name}[k]`, false, t, snippets, t)})`;
|
|
12980
12982
|
}
|
|
12981
12983
|
return `exports[k]${_}=${_}${name}[k]`;
|
|
12982
12984
|
};
|
|
12985
|
+
const getGetter = (expression, configurable, t, { getDirectReturnFunction, getObject }, base = '') => {
|
|
12986
|
+
const [left, right] = getDirectReturnFunction([], {
|
|
12987
|
+
functionReturn: true,
|
|
12988
|
+
lineBreakIndent: null,
|
|
12989
|
+
name: null
|
|
12990
|
+
});
|
|
12991
|
+
const fields = [
|
|
12992
|
+
['enumerable', 'true'],
|
|
12993
|
+
['get', `${left}${expression}${right}`]
|
|
12994
|
+
];
|
|
12995
|
+
if (configurable)
|
|
12996
|
+
fields.unshift(['configurable', 'true']);
|
|
12997
|
+
return getObject(fields, { lineBreakIndent: { base, t } });
|
|
12998
|
+
};
|
|
12983
12999
|
|
|
12984
13000
|
function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, indent, snippets) {
|
|
12985
13001
|
const { _, cnst, n } = snippets;
|
|
@@ -16063,19 +16079,17 @@ class JSXAttribute extends NodeBase {
|
|
|
16063
16079
|
}
|
|
16064
16080
|
if (value) {
|
|
16065
16081
|
code.overwrite(name.end, value.start, ': ', { contentOnly: true });
|
|
16066
|
-
// foo="aa \n aa"
|
|
16067
|
-
if (value instanceof Literal &&
|
|
16068
|
-
typeof value.value === 'string' &&
|
|
16069
|
-
value.value.includes('\n')) {
|
|
16070
|
-
code.overwrite(value.start, value.end, JSON.stringify(value.value), {
|
|
16071
|
-
contentOnly: true
|
|
16072
|
-
});
|
|
16073
|
-
}
|
|
16074
16082
|
}
|
|
16075
16083
|
else {
|
|
16076
16084
|
code.appendLeft(name.end, ': true');
|
|
16077
16085
|
}
|
|
16078
16086
|
}
|
|
16087
|
+
// JSX strings contain HTML entities but no escape sequences
|
|
16088
|
+
if (value instanceof Literal && typeof value.value === 'string') {
|
|
16089
|
+
code.overwrite(value.start, value.end, JSON.stringify(value.value), {
|
|
16090
|
+
contentOnly: true
|
|
16091
|
+
});
|
|
16092
|
+
}
|
|
16079
16093
|
}
|
|
16080
16094
|
}
|
|
16081
16095
|
}
|
|
@@ -21222,7 +21236,8 @@ class Chunk {
|
|
|
21222
21236
|
exported: exportName,
|
|
21223
21237
|
expression,
|
|
21224
21238
|
hoisted,
|
|
21225
|
-
local
|
|
21239
|
+
local,
|
|
21240
|
+
needsLiveBinding: variable.isReassigned && this.exportNamesByVariable.get(variable).length > 1
|
|
21226
21241
|
});
|
|
21227
21242
|
}
|
|
21228
21243
|
return exports;
|
|
@@ -21900,7 +21915,8 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
21900
21915
|
const { entriesAndManualChunksCount, dependentEntriesByModule, dynamicallyDependentEntriesByDynamicEntry, dynamicImportsByEntry, dynamicallyDependentEntriesByAwaitedDynamicEntry, awaitedDynamicImportsByEntry } = analyzeModuleGraph(entries, manualChunkModules, manualChunkModulesByModule);
|
|
21901
21916
|
// Each chunk is identified by its position in this array
|
|
21902
21917
|
const chunkAtoms = getChunksWithSameDependentEntries(getModulesWithDependentEntriesAndHandleTLACycles(dependentEntriesByModule, manualChunkModulesByModule, chunkDefinitions));
|
|
21903
|
-
const
|
|
21918
|
+
const manualChunkAtoms = getManualChunkAtoms(manualChunkModules, dependentEntriesByModule);
|
|
21919
|
+
const staticDependencyAtomsByEntry = getStaticDependencyAtomsByEntry(entriesAndManualChunksCount, concatLazy([chunkAtoms, manualChunkAtoms]));
|
|
21904
21920
|
// Warning: This will consume dynamicallyDependentEntriesByDynamicEntry.
|
|
21905
21921
|
// If we no longer want this, we should make a copy here.
|
|
21906
21922
|
const alreadyLoadedAtomsByEntry = getAlreadyLoadedAtomsByEntry(staticDependencyAtomsByEntry, dynamicallyDependentEntriesByDynamicEntry, dynamicImportsByEntry, entriesAndManualChunksCount);
|
|
@@ -21908,7 +21924,7 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
|
|
|
21908
21924
|
const awaitedAlreadyLoadedAtomsByEntry = getAwaitedAlreadyLoadedAtomsByEntry(staticDependencyAtomsByEntry, dynamicallyDependentEntriesByAwaitedDynamicEntry, awaitedDynamicImportsByEntry, entriesAndManualChunksCount);
|
|
21909
21925
|
// This mutates the dependentEntries in chunkAtoms
|
|
21910
21926
|
removeUnnecessaryDependentEntries(chunkAtoms, alreadyLoadedAtomsByEntry, awaitedAlreadyLoadedAtomsByEntry);
|
|
21911
|
-
const { chunks, sideEffectAtoms, sizeByAtom } = getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize);
|
|
21927
|
+
const { chunks, sideEffectAtoms, sizeByAtom } = getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, manualChunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize);
|
|
21912
21928
|
chunkDefinitions.push(...getOptimizedChunks(chunks, minChunkSize, sideEffectAtoms, sizeByAtom, log).map(({ modules }) => ({
|
|
21913
21929
|
alias: null,
|
|
21914
21930
|
modules
|
|
@@ -22129,6 +22145,12 @@ function* getModulesWithDependentEntriesAndHandleTLACycles(dependentEntriesByMod
|
|
|
22129
22145
|
}
|
|
22130
22146
|
}
|
|
22131
22147
|
}
|
|
22148
|
+
function getManualChunkAtoms(manualChunkModules, dependentEntriesByModule) {
|
|
22149
|
+
return manualChunkModules.map(modules => ({
|
|
22150
|
+
dependentEntries: dependentEntriesByModule.get(modules[0]),
|
|
22151
|
+
modules
|
|
22152
|
+
}));
|
|
22153
|
+
}
|
|
22132
22154
|
function getStaticDependencyAtomsByEntry(entriesAndManualChunksCount, chunkAtoms) {
|
|
22133
22155
|
// The indices correspond to the indices in allEntries. The atoms correspond
|
|
22134
22156
|
// to bits in the bigint values where chunk 0 is the lowest bit.
|
|
@@ -22220,10 +22242,10 @@ function removeUnnecessaryDependentEntries(chunkAtoms, alreadyLoadedAtomsByEntry
|
|
|
22220
22242
|
chunkMask <<= 1n;
|
|
22221
22243
|
}
|
|
22222
22244
|
}
|
|
22223
|
-
function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize) {
|
|
22245
|
+
function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, manualChunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize) {
|
|
22224
22246
|
const chunksBySignature = Object.create(null);
|
|
22225
22247
|
const chunkByModule = new Map();
|
|
22226
|
-
const sizeByAtom = new Array(chunkAtoms.length);
|
|
22248
|
+
const sizeByAtom = new Array(chunkAtoms.length + manualChunkAtoms.length);
|
|
22227
22249
|
let sideEffectAtoms = 0n;
|
|
22228
22250
|
let atomMask = 1n;
|
|
22229
22251
|
let index = 0;
|
|
@@ -22248,34 +22270,54 @@ function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticD
|
|
|
22248
22270
|
pure: true,
|
|
22249
22271
|
size: 0
|
|
22250
22272
|
});
|
|
22251
|
-
let atomSize = 0;
|
|
22252
|
-
let pure = true;
|
|
22253
22273
|
for (const module of modules) {
|
|
22254
22274
|
chunkByModule.set(module, chunk);
|
|
22255
|
-
// Unfortunately, we cannot take tree-shaking into account here because
|
|
22256
|
-
// rendering did not happen yet, but we can detect empty modules
|
|
22257
|
-
if (module.isIncluded()) {
|
|
22258
|
-
pure &&= !module.hasEffects();
|
|
22259
|
-
// we use a trivial size for the default minChunkSize to improve
|
|
22260
|
-
// performance
|
|
22261
|
-
atomSize += minChunkSize > 1 ? module.estimateSize() : 1;
|
|
22262
|
-
}
|
|
22263
22275
|
}
|
|
22276
|
+
const { pure, size } = getAtomPurityAndSize(modules, minChunkSize);
|
|
22264
22277
|
if (!pure) {
|
|
22265
22278
|
sideEffectAtoms |= atomMask;
|
|
22266
22279
|
}
|
|
22267
|
-
sizeByAtom[index++] =
|
|
22280
|
+
sizeByAtom[index++] = size;
|
|
22268
22281
|
chunk.containedAtoms |= atomMask;
|
|
22269
22282
|
chunk.modules.push(...modules);
|
|
22270
22283
|
chunk.pure &&= pure;
|
|
22271
|
-
chunk.size +=
|
|
22284
|
+
chunk.size += size;
|
|
22285
|
+
atomMask <<= 1n;
|
|
22286
|
+
}
|
|
22287
|
+
// Manual chunks are not merged, but chunks importing them need to know
|
|
22288
|
+
// their size and side effects
|
|
22289
|
+
const manualChunkAtomByModule = new Map();
|
|
22290
|
+
for (const { modules } of manualChunkAtoms) {
|
|
22291
|
+
for (const module of modules) {
|
|
22292
|
+
manualChunkAtomByModule.set(module, atomMask);
|
|
22293
|
+
}
|
|
22294
|
+
const { pure, size } = getAtomPurityAndSize(modules, minChunkSize);
|
|
22295
|
+
if (!pure) {
|
|
22296
|
+
sideEffectAtoms |= atomMask;
|
|
22297
|
+
}
|
|
22298
|
+
sizeByAtom[index++] = size;
|
|
22272
22299
|
atomMask <<= 1n;
|
|
22273
22300
|
}
|
|
22274
22301
|
const chunks = Object.values(chunksBySignature);
|
|
22275
|
-
sideEffectAtoms |= addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule, atomMask);
|
|
22302
|
+
sideEffectAtoms |= addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule, manualChunkAtomByModule, atomMask);
|
|
22276
22303
|
return { chunks, sideEffectAtoms, sizeByAtom };
|
|
22277
22304
|
}
|
|
22278
|
-
function
|
|
22305
|
+
function getAtomPurityAndSize(modules, minChunkSize) {
|
|
22306
|
+
let pure = true;
|
|
22307
|
+
let size = 0;
|
|
22308
|
+
for (const module of modules) {
|
|
22309
|
+
// Unfortunately, we cannot take tree-shaking into account here because
|
|
22310
|
+
// rendering did not happen yet, but we can detect empty modules
|
|
22311
|
+
if (module.isIncluded()) {
|
|
22312
|
+
pure &&= !module.hasEffects();
|
|
22313
|
+
// we use a trivial size for the default minChunkSize to improve
|
|
22314
|
+
// performance
|
|
22315
|
+
size += minChunkSize > 1 ? module.estimateSize() : 1;
|
|
22316
|
+
}
|
|
22317
|
+
}
|
|
22318
|
+
return { pure, size };
|
|
22319
|
+
}
|
|
22320
|
+
function addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule, manualChunkAtomByModule, nextAvailableAtomMask) {
|
|
22279
22321
|
const signatureByExternalModule = new Map();
|
|
22280
22322
|
let externalSideEffectAtoms = 0n;
|
|
22281
22323
|
for (const chunk of chunks) {
|
|
@@ -22296,9 +22338,17 @@ function addChunkDependenciesAndGetExternalSideEffectAtoms(chunks, chunkByModule
|
|
|
22296
22338
|
}
|
|
22297
22339
|
else {
|
|
22298
22340
|
const dependencyChunk = chunkByModule.get(dependency);
|
|
22299
|
-
if (dependencyChunk
|
|
22300
|
-
|
|
22301
|
-
|
|
22341
|
+
if (dependencyChunk) {
|
|
22342
|
+
if (dependencyChunk !== chunk) {
|
|
22343
|
+
dependencies.add(dependencyChunk);
|
|
22344
|
+
dependencyChunk.dependentChunks.add(chunk);
|
|
22345
|
+
}
|
|
22346
|
+
}
|
|
22347
|
+
else {
|
|
22348
|
+
const manualChunkAtom = manualChunkAtomByModule.get(dependency);
|
|
22349
|
+
if (manualChunkAtom) {
|
|
22350
|
+
chunk.containedAtoms |= manualChunkAtom;
|
|
22351
|
+
}
|
|
22302
22352
|
}
|
|
22303
22353
|
}
|
|
22304
22354
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.64.
|
|
3
|
+
"version": "4.64.10",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -116,31 +116,31 @@
|
|
|
116
116
|
"optionalDependencies": {
|
|
117
117
|
"@napi-rs/lzma-linux-x64-gnu": "1.5.1",
|
|
118
118
|
"fsevents": "~2.3.2",
|
|
119
|
-
"@rollup/rollup-darwin-arm64": "4.64.
|
|
120
|
-
"@rollup/rollup-android-arm64": "4.64.
|
|
121
|
-
"@rollup/rollup-win32-arm64-msvc": "4.64.
|
|
122
|
-
"@rollup/rollup-freebsd-arm64": "4.64.
|
|
123
|
-
"@rollup/rollup-linux-arm64-gnu": "4.64.
|
|
124
|
-
"@rollup/rollup-linux-arm64-musl": "4.64.
|
|
125
|
-
"@rollup/rollup-android-arm-eabi": "4.64.
|
|
126
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.64.
|
|
127
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.64.
|
|
128
|
-
"@rollup/rollup-win32-ia32-msvc": "4.64.
|
|
129
|
-
"@rollup/rollup-linux-loong64-gnu": "4.64.
|
|
130
|
-
"@rollup/rollup-linux-loong64-musl": "4.64.
|
|
131
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.64.
|
|
132
|
-
"@rollup/rollup-linux-riscv64-musl": "4.64.
|
|
133
|
-
"@rollup/rollup-linux-ppc64-gnu": "4.64.
|
|
134
|
-
"@rollup/rollup-linux-ppc64-musl": "4.64.
|
|
135
|
-
"@rollup/rollup-linux-s390x-gnu": "4.64.
|
|
136
|
-
"@rollup/rollup-darwin-x64": "4.64.
|
|
137
|
-
"@rollup/rollup-win32-x64-gnu": "4.64.
|
|
138
|
-
"@rollup/rollup-win32-x64-msvc": "4.64.
|
|
139
|
-
"@rollup/rollup-freebsd-x64": "4.64.
|
|
140
|
-
"@rollup/rollup-linux-x64-gnu": "4.64.
|
|
141
|
-
"@rollup/rollup-linux-x64-musl": "4.64.
|
|
142
|
-
"@rollup/rollup-openbsd-x64": "4.64.
|
|
143
|
-
"@rollup/rollup-openharmony-arm64": "4.64.
|
|
119
|
+
"@rollup/rollup-darwin-arm64": "4.64.10",
|
|
120
|
+
"@rollup/rollup-android-arm64": "4.64.10",
|
|
121
|
+
"@rollup/rollup-win32-arm64-msvc": "4.64.10",
|
|
122
|
+
"@rollup/rollup-freebsd-arm64": "4.64.10",
|
|
123
|
+
"@rollup/rollup-linux-arm64-gnu": "4.64.10",
|
|
124
|
+
"@rollup/rollup-linux-arm64-musl": "4.64.10",
|
|
125
|
+
"@rollup/rollup-android-arm-eabi": "4.64.10",
|
|
126
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.64.10",
|
|
127
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.64.10",
|
|
128
|
+
"@rollup/rollup-win32-ia32-msvc": "4.64.10",
|
|
129
|
+
"@rollup/rollup-linux-loong64-gnu": "4.64.10",
|
|
130
|
+
"@rollup/rollup-linux-loong64-musl": "4.64.10",
|
|
131
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.64.10",
|
|
132
|
+
"@rollup/rollup-linux-riscv64-musl": "4.64.10",
|
|
133
|
+
"@rollup/rollup-linux-ppc64-gnu": "4.64.10",
|
|
134
|
+
"@rollup/rollup-linux-ppc64-musl": "4.64.10",
|
|
135
|
+
"@rollup/rollup-linux-s390x-gnu": "4.64.10",
|
|
136
|
+
"@rollup/rollup-darwin-x64": "4.64.10",
|
|
137
|
+
"@rollup/rollup-win32-x64-gnu": "4.64.10",
|
|
138
|
+
"@rollup/rollup-win32-x64-msvc": "4.64.10",
|
|
139
|
+
"@rollup/rollup-freebsd-x64": "4.64.10",
|
|
140
|
+
"@rollup/rollup-linux-x64-gnu": "4.64.10",
|
|
141
|
+
"@rollup/rollup-linux-x64-musl": "4.64.10",
|
|
142
|
+
"@rollup/rollup-openbsd-x64": "4.64.10",
|
|
143
|
+
"@rollup/rollup-openharmony-arm64": "4.64.10"
|
|
144
144
|
},
|
|
145
145
|
"dependencies": {
|
|
146
146
|
"@types/estree": "1.0.9"
|