Skip to content

Commit de9dd86

Browse files
jbedardalexeagle
authored andcommitted
fix(rollup): include externals config in worker cache key
1 parent 7f81e5d commit de9dd86

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

packages/rollup/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,16 @@ async function runRollup(cacheKeyData, inputOptions, outputOptions) {
8282
async function runRollupBundler(args /*, inputs */) {
8383
const {inputOptions, outputOptions} = await parseCLIArgs(args);
8484

85-
return runRollup(inputOptions.input, inputOptions, outputOptions);
85+
const cacheKeyData = [
86+
inputOptions.input,
87+
88+
// Include changes to externals in the cache key because rollup currently
89+
// ignores such changes when using the caching API
90+
// See https://github.com/rollup/rollup/issues/3874
91+
inputOptions.external
92+
];
93+
94+
return runRollup(cacheKeyData, inputOptions, outputOptions);
8695
}
8796

8897
// Processing of --environment CLI options into environment vars

0 commit comments

Comments
 (0)