feat(plugin)!: a plugin is a named object, not a function

BREAKING CHANGE: `Plugin` is now `{ name, mount(api) }`. `fn.name` was the only
source for the name that plugin:mounted reports, and it is empty for a returned
arrow, "plugin" for a const, and whatever a minifier decides. A failed mount now
names the plugin and keeps the original error as its cause, and two plugins with
the same name fail createApp.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-09-16 22:26:13 -05:00
1 parent e83d62cc1a
commit 80f3f532f2
4 files changed
+152 -6

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
"target": "es2017",
"module": "commonjs",
"moduleResolution": "node",
"lib": ["es2020"],
"lib": ["es2020", "es2022.error"],
"declaration": true,
"outDir": "dist",
"rootDir": ".",