JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 629582
  • Score
    100M100P100Q173484F
  • License MIT

Caches the result of following loaders on disk.

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

npm deps test coverage chat

cache-loader

Caches the result of following loaders on disk.

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


sokra