Webpack Virtual Module plugin doesn't support triggering a rebuild for webpack5, which can cause the module not found error when webpack5 cache is enabled (E.g., Next.js enables webpack cache by default). Currently, the only workaround is to mark this module as non-cacheable, force updating the virtual module.
Webpack Virtual Module plugin doesn't support triggering a rebuild for webpack5, which can cause the
module not found
error when webpack5 cache is enabled (E.g., Next.js enables webpack cache by default). Currently, the only workaround is to mark this module as non-cacheable, force updating the virtual module.Related: