Package Exports
- cache-loader
- cache-loader/package.json
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 (cache-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Install
npm install --save-dev cache-loader
Usage
Add this loading in from of other (expensive) loaders to cache the result on disk.
Examples
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.js$/,
include: path.resolve("src"),
use: [
"cache-loader",
"babel-loader"
]
}
]
}
}
with options
use: [
{
loader: "cache-loader",
options: {
// provide a cache directory where cache items should be stored
cacheDirectory: path.resolve(".cache")
}
},
"babel-loader"
]
Maintainers
![]() |