(code, id)
| 309 | server = _server |
| 310 | }, |
| 311 | async transform(code, id) { |
| 312 | if (filter(id) || filter(cleanUrl(id))) { |
| 313 | const result = await transformWithEsbuild( |
| 314 | code, |
| 315 | id, |
| 316 | transformOptions, |
| 317 | undefined, |
| 318 | config, |
| 319 | server?.watcher, |
| 320 | ) |
| 321 | if (result.warnings.length) { |
| 322 | result.warnings.forEach((m) => { |
| 323 | this.warn(prettifyMessage(m, code)) |
| 324 | }) |
| 325 | } |
| 326 | if (jsxInject && jsxExtensionsRE.test(id)) { |
| 327 | result.code = jsxInject + ';' + result.code |
| 328 | } |
| 329 | return { |
| 330 | code: result.code, |
| 331 | map: result.map, |
| 332 | moduleType: 'js', |
| 333 | } |
| 334 | } |
| 335 | }, |
| 336 | } |
| 337 | } |
| 338 |
no test coverage detected