]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
perf(runtime-core): use feature flag for call to resolveMergedOptions (#12163)
authorskirtle <65301168+skirtles-code@users.noreply.github.com>
Mon, 14 Oct 2024 00:18:18 +0000 (01:18 +0100)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2024 00:18:18 +0000 (08:18 +0800)
Reduce bundle size when using `__VUE_OPTIONS_API__: false`

packages/runtime-core/src/component.ts

index 939f5a401f0a33da5e009fdb984f4d3cbaea303a..3ed42ed0b55bec8c89976c6d010c878b7b196325 100644 (file)
@@ -1006,7 +1006,7 @@ export function finishComponentSetup(
           instance.vnode.props &&
           instance.vnode.props['inline-template']) ||
         Component.template ||
-        resolveMergedOptions(instance).template
+        (__FEATURE_OPTIONS_API__ && resolveMergedOptions(instance).template)
       if (template) {
         if (__DEV__) {
           startMeasure(instance, `compile`)