package
Webpack loader to provide fallback keys & values for use with multi-json-loader
npm install fallback-multi-json-loaderGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
npm install fallback-multi-json-loaderReturns a single JSON blob with keys and values made by calling multi-json-loader then merging in the result of the following loaders using lodash merge. If two leaf nodes conflict, the one from the following loaders (from data/pt in the below example) wins.
{
"both-key1": "both-key1-en-value",
"en-key1": "en-key1-value"
}{
"both-key1": "both-key1-pt-value",
"pt-key1": "pt-key1-value"
}var data = require('json-loader!fallback-multi-json-loader?cwd=data/en!multi-json-loader?cwd=data/pt!./irrelevant.whatever');
// => {
// account: {
// 'both-key1': 'both-key1-pt-value',
// 'en-key1': 'en-key1-value',
// 'pt-key1': 'pt-key1-value'
// }
// }Same as multi-json-loader.
MIT
Estimated unpacked size across 8 packages.
4.5 MB
Includes dependencies.
3 direct · 1 outdated