Skip to content

Commit

Permalink
fix(rollup): include externals config in worker cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard authored and alexeagle committed Mar 7, 2021
1 parent 7f81e5d commit de9dd86
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/rollup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ async function runRollup(cacheKeyData, inputOptions, outputOptions) {
async function runRollupBundler(args /*, inputs */) {
const {inputOptions, outputOptions} = await parseCLIArgs(args);

return runRollup(inputOptions.input, inputOptions, outputOptions);
const cacheKeyData = [
inputOptions.input,

// Include changes to externals in the cache key because rollup currently
// ignores such changes when using the caching API
// See https://github.com/rollup/rollup/issues/3874
inputOptions.external
];

return runRollup(cacheKeyData, inputOptions, outputOptions);
}

// Processing of --environment CLI options into environment vars
Expand Down

0 comments on commit de9dd86

Please sign in to comment.