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

Class ResolvePlugin

test/helpers/getCodeFromLess.js:149–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147};
148
149class ResolvePlugin extends less.FileManager {
150 supports(filename) {
151 if (filename[0] === "/" || path.win32.isAbsolute(filename)) {
152 return true;
153 }
154
155 if (this.isPathAbsolute(filename)) {
156 return false;
157 }
158
159 return true;
160 }
161
162 supportsSync() {
163 return false;
164 }
165
166 async loadFile(filename, ...args) {
167 const result =
168 pathMap[filename] || path.resolve(__dirname, "..", "fixtures", filename);
169
170 return super.loadFile(result, ...args);
171 }
172}
173
174class CustomImportPlugin {
175 install(lessInstance, pluginManager) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…