()
| 625 | let cached; |
| 626 | |
| 627 | const devtoolBackCompat = () => { |
| 628 | if (Array.isArray(_devtool)) { |
| 629 | if (cached) return cached; |
| 630 | // Prefer `all`, then `javascript`, then `css` |
| 631 | const match = ["all", "javascript", "css"] |
| 632 | .map((type) => |
| 633 | /** @type {Extract<WebpackOptionsNormalized["devtool"], EXPECTED_ANY[]>} */ ( |
| 634 | _devtool |
| 635 | ).find((item) => item.type === type) |
| 636 | ) |
| 637 | .find(Boolean); |
| 638 | |
| 639 | // If `devtool: []` is specified, return `false` here |
| 640 | return (cached = match ? match.use : false); |
| 641 | } |
| 642 | return _devtool; |
| 643 | }; |
| 644 | |
| 645 | /** @type {ProxyHandler<WebpackOptionsNormalized>} */ |
| 646 | const handler = Object.create(null); |
no test coverage detected