nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.75k stars 483 forks source link

fix: `defineI18nRoute` macro transformed inside `<template>` #2887

Closed BobbieGoede closed 7 months ago

BobbieGoede commented 7 months ago

πŸ”— Linked issue

❓ Type of change

πŸ“š Description

This is very specific, I don't think anyone ran into this bug πŸ˜…

While refactoring/merging tests I noticed that the text defineI18nRoute(false) inside of <template> in specs/fixtures/basic/pages/index.vue was being transformed and replaced to false && /*#__PURE__*/ defineI18nRoute(false). This should only happen inside the script contents.

Maybe this PR changes the transform plugin more than it should, if anything is off let me know!

πŸ“ Checklist