Skip to content

Commit 2bb2a18

Browse files
committed
Use a separate Rollup cache for modern output.
1 parent f7d231a commit 2bb2a18

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ export default async function microbundle(inputOptions) {
252252
let out = await series(
253253
steps.map(config => async () => {
254254
const { inputOptions, outputOptions } = config;
255-
inputOptions.cache = cache;
255+
if (inputOptions.cache !== false) {
256+
inputOptions.cache = cache;
257+
}
256258
let bundle = await rollup(inputOptions);
257259
cache = bundle;
258260
await bundle.write(outputOptions);
@@ -498,6 +500,9 @@ function createConfig(options, entry, format, writeMeta) {
498500

499501
let config = {
500502
inputOptions: {
503+
// disable Rollup's cache for the modern build to prevent re-use of legacy transpiled modules:
504+
cache: modern ? false : undefined,
505+
501506
input: entry,
502507
external: id => {
503508
if (id === 'babel-plugin-transform-async-to-promises/helpers') {

0 commit comments

Comments
 (0)