fix(lib/plugins): external JS plugins not loading

This commit is contained in:
PalmDevs 2026-07-28 12:57:29 +07:00
parent e73bbc03ba
commit c7b5ae8ee6
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -242,7 +242,8 @@ function createOptionsFactory(script?: string): PluginOptionsFactory {
pUnscopedApi, pUnscopedApi,
// See types.consumers.ts // See types.consumers.ts
(opts: PluginOptions) => opts, (opts: PluginOptions) => opts,
)() )?.default
if (typeof opts !== 'object' || opts === null) if (typeof opts !== 'object' || opts === null)
throw new Error('Plugin options must be an object') throw new Error('Plugin options must be an object')