[BUG] Build fails if path contains non-ASCII characters
ExEr7um opened this issue · 2 comments
If path to project contains non-ASCII characters build fails.
I found out that it happens because of <style>
block, if I remove it in Icon.vue
and IconCSS.vue
then build succeeds. I think it's not as issue with nuxt-icon
in particular, probably upstream issue, but I failed to reproduce it without the module.
Reproduction
https://codesandbox.io/p/devbox/recursing-moon-q5nl7r
cd 🛠️
npm run build
You will get:
ERROR Nuxt Build Error: [vite:vue] Could not load /workspaces/workspace/\u{1F6E0}\uFE0F/node_modules/nuxt-icon/dist/runtime/Icon.vue?vue&type=style&index=0&scoped=e8d572f6&lang.css?inline&used: ENOENT: no such file or directory, open '/workspaces/workspace/\u{1F6E0}\uFE0F/node_modules/nuxt-icon/dist/runtime/Icon.vue'
Related issues
@danielroe can you look, please, if it's an upstream issue or not?
This isn't an issue with the nuxt-icon
module - I can reproduce with a plain project + a component with scoped styles. It seems to be thrown by vite-plugin-vue, which is trying to load a file from the filesystem without converting the path back to the correct format.
I would suggest raising in https://github.com/vitejs/vite-plugin-vue. 🙏