MCPcopy Create free account
hub / github.com/webpack/less-loader / loadFile

Method loadFile

test/fixtures/folder/customFileLoaderPlugin.cjs:17–29  ·  view source on GitHub ↗
(filename, ...args)

Source from the content-addressed store, hash-verified

15 }
16
17 loadFile(filename, ...args) {
18 let result;
19
20 if (filename === "forFileLoaderPluginResolve.less") {
21 result = path.resolve(__dirname, "../", "file-load-replacement.less");
22 } else if (
23 filename === "https://fonts.googleapis.com/css?family=Roboto:500"
24 ) {
25 result = path.resolve(__dirname, "../", "mock-fonts.less");
26 }
27
28 return super.loadFile(result, ...args);
29 }
30}
31
32class CustomFileLoaderPlugin {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected