(pkg: string, isCustom: boolean)
| 1905 | } |
| 1906 | |
| 1907 | async #loadPackage<T>(pkg: string, isCustom: boolean): Promise<T> { |
| 1908 | const importTarget = |
| 1909 | isCustom && /^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(pkg) ? pathToFileURL(pkg).toString() : pkg; |
| 1910 | |
| 1911 | return (await import(importTarget)).default; |
| 1912 | } |
| 1913 | |
| 1914 | async loadWebpack(): Promise<typeof webpack> { |
| 1915 | return this.#loadPackage(WEBPACK_PACKAGE, WEBPACK_PACKAGE_IS_CUSTOM); |
no outgoing calls
no test coverage detected