intlify / intlify/bundle-tools
[vite] Error if using HTML tags inside a file referenced by SFC block "src" attribute
- Dominant language
- TypeScript
- Stars
- 270
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
### Reporting a bug?
Hi, I stumbled upon a weird problem. I have localizations that contain HTML tags and it worked fine while the text was specified inside of `` SFC tag, but later I started switching to `
en:
test: message test text
```
While this fails:
```vue
```
`file.yaml`:
```yaml
en:
test: message test text
```
### Issue Package
vite-plugin-vue-i18n
### System Info
```shell
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
Memory: 1.30 GB / 7.82 GB
Binaries:
Node: 16.3.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.15.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 102.0.5005.63
Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.53)
npmPackages:
@intlify/vite-plugin-vue-i18n: ^4.0.0 => 4.0.0
vite: ^2.9.9 => 2.9.9
vue: ^3.2.25 => 3.2.36
vue-i18n: 9@beta => 9.2.0-beta.35
```
### Screenshot
_No response_
### Additional context
This issue can be currently avoided by using literal interpolation: `{'<'}` and `{'>'}`
### Validations
- [X] Read the [Contributing Guidelines](https://github.com/intlify/bundle-tools/blob/main/.github/contributing.md).
- [X] Read the README
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/intlify/bundle-tools/discussions).
Contributor guide
Assessment
This issue has not been assessed yet.