fix: message compiler tries to parse node_module dependency #168
Labels
Package: unplugin-vue-i18n
Status: PR Welcome
Welcome to Pull Request
Status: Proposal
Request for comments
Reporting a bug?
Using
@intlify/unplugin-vue-i18n
and havinghtml-to-text
on a Nuxt page, as given in the reproduction codesandbox, yields an error. Diving deeper reveals that a source file is tried to be loaded, which does not contain translations, but special characters. It ends in:To me this looks very much like coming from https://yarnpkg.com/package/entities or similar.
Expected behavior
The bundler only tries to compile actual translations, not special characters that seem to come out of
node_modules
.Reproduction
Run a
yarn build
over here: https://codesandbox.io/s/i18n-html-to-text-urt22w?file=/pages/index.vueTry commenting the
htmlToText
usage out and the basic string usage in and see that the error vanishes.Note: the error message there is obfuscated due to intlify/vue-i18n#1142.
Issue Package
unplugin-vue-i18n
System Info
Screenshot
No response
Additional context
Maybe the node_modules folder can be ignored?
Validations
The text was updated successfully, but these errors were encountered: