Skip to content

Incompatibility with Vue Vapor #2234

@ThatOneCalculator

Description

@ThatOneCalculator

Reporting a bug?

Attempting to do

<script setup vapor lang="ts">
import { useI18n } from "vue-i18n";

const { t } = useI18n();
</script>

Results in

Uncaught (in promise) SyntaxError: Must be called at the top of a `setup` function
    createCompileError message-compiler.mjs:77
    createI18nError vue-i18n.runtime.mjs:63
    useI18n vue-i18n.runtime.mjs:2138
    setup ThisFile.vue:3

Expected behavior

Works in Vue Vapor as it does with non-Vapor Vue

Reproduction

None

System Info

"@intlify/unplugin-vue-i18n": "^6.0.8",
"vue": "^3.6.0-alpha.1",
"vue-i18n": "^11.1.10",
"vite": "^7.0.5",

Screenshot

No response

Additional context

https://github.com/vuejs/core/releases/tag/v3.6.0-alpha.1#about-vapor-mode

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❗ p4-importantPriority 4: bugs that violate documented behavior, or significantly impact perf

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions