This pull request introduces a feature to automatically load all language paths from vendor packages directly from the vendor folder without publishing them. Previously if you didn't want to publish the package lang files, the packages paths had to be manually specified in the additionalLangPaths option.
To maintain compatibility for those already adding the paths manually, this feature is disabled by default. It can be enabled by setting the loadPackagesLangPaths option to true in the Vite plugin options.
An added benefit of using this new feature is that the generated translation key will align with the key used by Laravel in PHP, offering a more consistent and streamlined approach.
Additionally, the README.md has been updated to include the new loadPackagesLangPaths option.
This pull request introduces a feature to automatically load all language paths from vendor packages directly from the
vendor
folder without publishing them. Previously if you didn't want to publish the package lang files, the packages paths had to be manually specified in theadditionalLangPaths
option.To maintain compatibility for those already adding the paths manually, this feature is disabled by default. It can be enabled by setting the
loadPackagesLangPaths
option totrue
in the Vite plugin options.An added benefit of using this new feature is that the generated translation key will align with the key used by Laravel in PHP, offering a more consistent and streamlined approach.
Additionally, the README.md has been updated to include the new
loadPackagesLangPaths
option.