Expose a function for plugins to check if async plugins are supported by the current compilation.
This commit is contained in:
parent
0e88156d0c
commit
44c2791849
@ -142,6 +142,7 @@ const readConfigJS = makeStrongCache((filepath, cache) => {
|
||||
cache,
|
||||
// Expose ".env()" so people can easily get the same env that we expose using the "env" key.
|
||||
env: () => cache.using(() => getEnv()),
|
||||
async: () => false,
|
||||
});
|
||||
} else {
|
||||
cache.forever();
|
||||
|
||||
@ -189,6 +189,7 @@ const loadDescriptor = makeWeakCache(
|
||||
const api = Object.assign(Object.create(context), {
|
||||
cache,
|
||||
env: () => cache.using(() => getEnv()),
|
||||
async: () => false,
|
||||
});
|
||||
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user