Skip to content

Commit

Permalink
moving require into loader function
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jan 22, 2021
1 parent 8d3b401 commit a663fbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/webpack/copy-files-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
'use strict';

const LoaderDependency = require('webpack/lib/dependencies/LoaderDependency');
const fileLoader = require('file-loader'); // eslint-disable-line node/no-unpublished-require
const loaderUtils = require('loader-utils');
const path = require('path');

Expand Down Expand Up @@ -86,6 +85,8 @@ module.exports.default = function loader(source) {
}
});

const fileLoader = require('file-loader'); // eslint-disable-line node/no-unpublished-require

// If everything is OK, let the file-loader do the copy
return fileLoader.bind(this)(source);
};

0 comments on commit a663fbc

Please sign in to comment.