@superherocheesecake/loaders-object-loader
v2.0.0
Published
Use as a loader for @superherocheesecake/loader.
Downloads
2
Maintainers
Keywords
Readme
JSON XHR loader
Use as a loader for @superherocheesecake/loader.
Usage
Set 'source' to a JSON response.
Example
import { loader } from '@superherocheescake/loader';
import ObjectLoader from '@superherocheescake/loaders-object-loader';
loader.use([
...
{test: /\.(json)$/, loader: ObjectLoader},
...
]);
loader.queue([
{id: 'json', source: 'file.json', loader: ObjectLoader}
]);