* @param {LoaderContext["fs"]} inputFileSystem input file system * @param {string} filepath file path * @returns {Promise } file contents
(inputFileSystem, filepath)
| 346 | * @returns {Promise<Buffer>} file contents |
| 347 | */ |
| 348 | function readFile(inputFileSystem, filepath) { |
| 349 | return new Promise((resolve, reject) => { |
| 350 | inputFileSystem.readFile(filepath, (error, stats) => { |
| 351 | if (error) { |
| 352 | reject(error); |
| 353 | } |
| 354 | |
| 355 | resolve(/** @type {Buffer} */ (stats)); |
| 356 | }); |
| 357 | }); |
| 358 | } |
| 359 | |
| 360 | const URL_RE = /^(?:url\s*\(\s*)?['"]?(?:[#/]|(?:https?:)?\/\/)/i; |
| 361 |
no outgoing calls
no test coverage detected
searching dependent graphs…