fix error when using a "withOptions" plugin

master
Brad Cornes 2021-05-09 19:34:25 +01:00
parent c98b2d2994
commit f3f1f73410
1 changed files with 3 additions and 0 deletions

View File

@ -586,6 +586,9 @@ async function createProjectService(
if (Array.isArray(exports.plugins)) {
userPlugins = exports.plugins
exports.plugins = exports.plugins.map((plugin) => {
if (plugin.__isOptionsFunction) {
plugin = plugin()
}
if (typeof plugin === 'function') {
let newPlugin = (...args) => {
if (!args[0].matchUtilities) {