Package Exports
- laravel-lang-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (laravel-lang-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Laravel Lang Loader
Loads a Laravel translations file as a as JSON into JavaScipt libraries.
Install
npm install laravel-lang-loaderUsage
In your app.js (or app.ts) file add:
import LaravelTranslations from 'laravel-lang-loader!laravel-lang-loader';where LaravelTranslation can be any variable name.
Configuration is provided by .json file, and it must be store in ./resource/lang with .lll.config.json name. Minimal requirement is at least
one lang dir defined in dir key:
// lll.config.json
{
"dir": [
"./resources/lang",
{
"path": "./app/Modules/*/resources/lang",
"namespaceFromPath": "./app/Modules/[:namespace]/resources/lang"
}
],
"php": true,
"json": true
}