Skip to content

Commit

Permalink
add cacheable to loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Dec 17, 2018
1 parent dc97d1a commit db6eb51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/loaders/node-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const sharedlibEmit = require('../utils/sharedlib-emit');
const getPackageBase = require('../utils/get-package-base');

module.exports = async function (content) {
this.async();
if (this.cacheable)
this.cacheable();
this.async();

const id = this.resourcePath;
const options = getOptions(this);
Expand Down
2 changes: 2 additions & 0 deletions src/loaders/relocate-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ const relocateRegEx = /_\_dirname|_\_filename|require\.main|node-pre-gyp|binding


module.exports = function (code) {
if (this.cacheable)
this.cacheable();
this.async();
const id = this.resourcePath;

Expand Down

0 comments on commit db6eb51

Please sign in to comment.