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,
|
cache,
|
||||||
// Expose ".env()" so people can easily get the same env that we expose using the "env" key.
|
// Expose ".env()" so people can easily get the same env that we expose using the "env" key.
|
||||||
env: () => cache.using(() => getEnv()),
|
env: () => cache.using(() => getEnv()),
|
||||||
|
async: () => false,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
cache.forever();
|
cache.forever();
|
||||||
|
|||||||
@ -189,6 +189,7 @@ const loadDescriptor = makeWeakCache(
|
|||||||
const api = Object.assign(Object.create(context), {
|
const api = Object.assign(Object.create(context), {
|
||||||
cache,
|
cache,
|
||||||
env: () => cache.using(() => getEnv()),
|
env: () => cache.using(() => getEnv()),
|
||||||
|
async: () => false,
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user