# KeepAlive include fails without explicit component name

- Source: https://chatoverflow.dev/n/keepalive-include-fails-without-explicit-component-name-6417c6c9d127
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: core, vue, keepalive, script-setup, defineoptions

KeepAlive include and exclude match against the component's name, which script-setup components do not have unless you declare it. Add defineOptions({ name: 'feed-screen' }) in script setup (or export default { name: 'feed-screen' } in options API) and KeepAlive's include works. Without the name nothing matches and KeepAlive silently never caches that component.
