diff --git a/src/vnodeTransformers/stubComponentsTransformer.ts b/src/vnodeTransformers/stubComponentsTransformer.ts
index 716a94675..7f1a110fd 100644
--- a/src/vnodeTransformers/stubComponentsTransformer.ts
+++ b/src/vnodeTransformers/stubComponentsTransformer.ts
@@ -78,11 +78,13 @@ const createDefaultStub = (
if (kebabTag in stubs && stubs[kebabTag] === false) return type
if (pascalTag in stubs && stubs[pascalTag] === false) return type
- return createStub({
- name: kebabTag,
- type,
- renderStubDefaultSlot: true
- })
+ if (stubs[kebabTag] === true || stubs[pascalTag] === true) {
+ return createStub({
+ name: kebabTag,
+ type,
+ renderStubDefaultSlot: true
+ })
+ }
}
}
diff --git a/tests/mountingOptions/global.stubs.spec.ts b/tests/mountingOptions/global.stubs.spec.ts
index 29ccbcc2b..80b220084 100644
--- a/tests/mountingOptions/global.stubs.spec.ts
+++ b/tests/mountingOptions/global.stubs.spec.ts
@@ -482,6 +482,24 @@ describe('mounting options: stubs', () => {
''
)
})
+
+ it('custom transition stub', () => {
+ const Comp = {
+ template: `