How to use the decache.default function in decache

To help you get started, we’ve selected a few decache examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nodkz / webpack-plugin-graphql-schema-hot / index.js View on Github external
const fs = require('fs').default || require('fs');
const minimatch = require('minimatch');
const decache = require('decache').default || require('decache');

function matchesGlobs(filePath, globs) {
  return (globs || []).some(glob => minimatch(filePath, glob, { matchBase: true }));
}

function WebpackPluginGraphqlSchemaHot(options) {
  this._canRun = true;
  const startupError = msg => {
    this._canRun = false;
    console.error('[WebpackPluginGraphqlSchemaHot]:\n' + msg);
  };

  const opts = options || {};
  this._isFirstRun = true;

  ///////////

decache

decache (Delete Cache) lets you delete modules from node.js require() cache; useful when testing your modules/projects.

MIT
Latest version published 2 years ago

Package Health Score

71 / 100
Full package analysis

Popular decache functions