(content)
| 139 | * @returns {PublicPathPlaceholderPlan} placeholder offsets |
| 140 | */ |
| 141 | const computePublicPathPlaceholderPlan = (content) => { |
| 142 | /** @type {number[]} */ |
| 143 | const autos = []; |
| 144 | const autoLen = PUBLIC_PATH_AUTO.length; |
| 145 | for ( |
| 146 | let idx = content.indexOf(PUBLIC_PATH_AUTO); |
| 147 | idx !== -1; |
| 148 | idx = content.indexOf(PUBLIC_PATH_AUTO, idx + autoLen) |
| 149 | ) { |
| 150 | autos.push(idx); |
| 151 | } |
| 152 | /** @type {{ start: number, end: number, length: number }[]} */ |
| 153 | const hashes = []; |
| 154 | walkFullHashPlaceholders(content, (start, end, length) => { |
| 155 | hashes.push({ start, end, length }); |
| 156 | }); |
| 157 | return { autos, hashes }; |
| 158 | }; |
| 159 | |
| 160 | /** |
| 161 | * Returns ], definitions: import("../../schemas/WebpackOptions.json")["definitions"] }} schema. |
no test coverage detected