* Load a file with proper path resolution * @private * @param {InputFileSystem} fs the input file system * @param {string} file the file to load * @returns {Promise<string>} the content of the file
(fs, file)
| 461 | * @returns {Promise<string>} the content of the file |
| 462 | */ |
| 463 | _loadFile(fs, file) { |
| 464 | return new Promise((resolve, reject) => { |
| 465 | fs.readFile(file, (err, content) => { |
| 466 | if (err) reject(err); |
| 467 | else resolve(/** @type {Buffer} */ (content).toString() || class="st">""); |
| 468 | }); |
| 469 | }); |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | module.exports = DotenvPlugin; |
no test coverage detected