mirror of
https://github.com/developit/microbundle.git
synced 2026-01-18 13:56:35 +00:00
Use a separate Rollup cache for modern output.
This commit is contained in:
parent
f7d231a5df
commit
2bb2a18198
@ -252,7 +252,9 @@ export default async function microbundle(inputOptions) {
|
||||
let out = await series(
|
||||
steps.map(config => async () => {
|
||||
const { inputOptions, outputOptions } = config;
|
||||
inputOptions.cache = cache;
|
||||
if (inputOptions.cache !== false) {
|
||||
inputOptions.cache = cache;
|
||||
}
|
||||
let bundle = await rollup(inputOptions);
|
||||
cache = bundle;
|
||||
await bundle.write(outputOptions);
|
||||
@ -498,6 +500,9 @@ function createConfig(options, entry, format, writeMeta) {
|
||||
|
||||
let config = {
|
||||
inputOptions: {
|
||||
// disable Rollup's cache for the modern build to prevent re-use of legacy transpiled modules:
|
||||
cache: modern ? false : undefined,
|
||||
|
||||
input: entry,
|
||||
external: id => {
|
||||
if (id === 'babel-plugin-transform-async-to-promises/helpers') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user