fix: stabilize plugin startup boundaries

This commit is contained in:
Peter Steinberger
2026-03-28 05:01:21 +00:00
parent 838013c87a
commit 23f0486810
6 changed files with 357 additions and 252 deletions

View File

@@ -173,10 +173,22 @@ describe("plugin-sdk root alias", () => {
});
it.each([
{
name: "prefers source loading when the source root alias runs in development",
options: {
distExists: true,
env: { NODE_ENV: "development" },
monolithicExports: {
slowHelper: (): string => "loaded",
},
},
expectedTryNative: false,
},
{
name: "prefers native loading when compat resolves to dist",
options: {
distExists: true,
env: { NODE_ENV: "production" },
monolithicExports: {
slowHelper: (): string => "loaded",
},