(options)
| 10 | * @returns {Promise<import(class="st">"../").Stats>} stats |
| 11 | */ |
| 12 | const compile = (options) => |
| 13 | /** @type {Promise<import(class="st">"../").Stats>} */ ( |
| 14 | new Promise((resolve, reject) => { |
| 15 | const webpack = require(class="st">".."); |
| 16 | |
| 17 | const compiler = /** @type {import(class="st">"../").Compiler} */ (webpack(options)); |
| 18 | compiler.outputFileSystem = /** @type {EXPECTED_ANY} */ ( |
| 19 | createFsFromVolume(new Volume()) |
| 20 | ); |
| 21 | compiler.run((err, stats) => { |
| 22 | if (err) { |
| 23 | reject(err); |
| 24 | } else { |
| 25 | resolve(/** @type {import(class="st">"../").Stats} */ (stats)); |
| 26 | } |
| 27 | }); |
| 28 | }) |
| 29 | ); |
| 30 | |
| 31 | expectNoDeprecations(); |
| 32 |
no test coverage detected