https://github.com/doowb/unlazy-loader
Webpack loader to transform lazy-cache files into unlazy cached files.
https://github.com/doowb/unlazy-loader
Last synced: 7 days ago
JSON representation
Webpack loader to transform lazy-cache files into unlazy cached files.
- Host: GitHub
- URL: https://github.com/doowb/unlazy-loader
- Owner: doowb
- License: mit
- Created: 2015-12-17T02:49:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T13:41:27.000Z (about 5 years ago)
- Last Synced: 2024-11-02T08:30:44.379Z (6 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# unlazy-loader [](https://www.npmjs.com/package/unlazy-loader)
> Webpack loader to transform lazy-cache files into unlazy cached files.
## Install
Install with [npm](https://www.npmjs.com/):```sh
$ npm i unlazy-loader --save
```## Usage
This loader is intended to be used with [webpack][webpack] to transform files using [lazy-cache][lazy-cache] into files that require modules directly.
Use this like any other [webpack loader](http://webpack.github.io/docs/using-loaders.html);```js
var webpackConfig = {
module: {
loaders: [
{
test: /\.js$/,
loader: 'unlazy-loader'
}
]
}
}
```## API
### [.`unlazy-loader`](index.js#L22)
Webpack loader used for transforming files that contain `lazy-cache` into files
that require modules directly.**Params**
* `source` **{String}**: Source code to inspect.
* `returns` **{String}**: Transformed source code.## Related projects
* [lazy-cache](https://www.npmjs.com/package/lazy-cache): Cache requires to be lazy-loaded when needed. | [homepage](https://github.com/jonschlinkert/lazy-cache)
* [webpack](https://www.npmjs.com/package/webpack): Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which… [more](https://www.npmjs.com/package/webpack) | [homepage](https://github.com/webpack/webpack)## Running tests
Install dev dependencies:```sh
$ npm i -d && npm test
```## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/doowb/unlazy-loader/issues/new).## Author
**Brian Woodward**+ [github/doowb](https://github.com/doowb)
+ [twitter/doowb](http://twitter.com/doowb)## License
Copyright © 2016 [Brian Woodward](https://github.com/doowb)
Released under the MIT license.***
_This file was generated by [verb](https://github.com/verbose/verb) on January 14, 2016._
[webpack]: https://github.com/webpack/webpack
[lazy-cache]: https://github.com/jonschlinkert/lazy-cache