Closed luxu-gg closed 3 weeks ago
Changing this would probably be breaking as it would force you to initialize the locales yourself in your scripts 🤔
So maybe it's best to leave it for now, until the next major version?
If you're not importing the locales module then it shouldn't be included in your build.
When using the js package, locale function is automaticaly initialized with
initLocale(
), fetching for the resource's locales/ folder. https://github.com/overextended/ox_lib/blob/5ac07d8b887aa2f1e68e5e3bec6497345aff7bbe/package/shared/resource/locale/index.ts#L90This is not optimal since we may not wish to use the lib's locales functionality. The main issue is, it attempts to find a locale that might not be present, producing a console warning.
This is a very low priority issue but I have received quite a few reports since it sometimes leads users to believe something might be broken.