Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vue-i18n is breaking render within <Tailwind></Tailwind> in child components #222

@MickL

Description

@MickL

Using vue-i18n within the root component works fine:

<template>
   {{ $t('hello') }}
</template>

Unfortunately everything breaks when using it in a child component:

Root:

<script setup lang="ts">
   import ChildComponent from './child-component.ts'
</script>

<template>
   <ChildComponent />
</template>

Child:

<template>
   {{ $t('hello') }}
</template>

This will throw a warning and render an empty string:

 Component Tailwind is missing template or render function. 
  at <Tailwind> 
  at <Mail >

This occurs only when using . Without it, it works fine.

Btw the same occurs when trying to use it just in code of a child component:

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

const { t } = useI18n();
console.log(t('hello'));
</script>

Repo: https://github.com/MickL/vue-email-vuei18n-bug

@kabarchonok Maybe you have an idea since you recently refactored the code for <Tailwind>?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions