From a663fbced5c1cab146430acb6a2a22940d26643d Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Thu, 21 Jan 2021 19:40:34 -0500 Subject: [PATCH] moving require into loader function --- lib/webpack/copy-files-loader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/webpack/copy-files-loader.js b/lib/webpack/copy-files-loader.js index 6ceb48c0..d95341e2 100644 --- a/lib/webpack/copy-files-loader.js +++ b/lib/webpack/copy-files-loader.js @@ -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'); @@ -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); };