user
user
NNuxt
Created by user on 11/9/2024 in #❓・help
Nuxt3 including local i18n file paths in window.NUXT in production builds.
This leaks the OS user name and file structure on the system of the site developer who built the project. How to remove these paths from there? Config looks like
locales: [
{ code: 'xx', name: 'XX', language: 'xx-XX', file: 'xx.json' },
{ code: 'en', name: 'English', language: 'en-US', file: 'en.json' },
],
locales: [
{ code: 'xx', name: 'XX', language: 'xx-XX', file: 'xx.json' },
{ code: 'en', name: 'English', language: 'en-US', file: 'en.json' },
],
Builded site index.html includes at bottom window.NUXT with
[{code:"xx",name:"XX",language:"xx-XX",files:["/Users/{USERNAME}/Work/Projects/MyNuxtWebSite/src/locales/xx.json"]},{code:"en",name:"English",language:"en-US",files:["/Users/{USERNAME}/Work/Projects/MyNuxtWebSite/src/locales/en.json"]}]
[{code:"xx",name:"XX",language:"xx-XX",files:["/Users/{USERNAME}/Work/Projects/MyNuxtWebSite/src/locales/xx.json"]},{code:"en",name:"English",language:"en-US",files:["/Users/{USERNAME}/Work/Projects/MyNuxtWebSite/src/locales/en.json"]}]
5 replies