(code, id)
| 307 | server = _server |
| 308 | }, |
| 309 | async transform(code, id) { |
| 310 | if (filter(id) || filter(cleanUrl(id)) || jsxRefreshFilter?.(id)) { |
| 311 | const modifiedOxcTransformOptions = getModifiedOxcTransformOptions( |
| 312 | oxcTransformOptions, |
| 313 | id, |
| 314 | code, |
| 315 | this.environment, |
| 316 | ) |
| 317 | const result = await transformWithOxc( |
| 318 | code, |
| 319 | id, |
| 320 | modifiedOxcTransformOptions, |
| 321 | undefined, |
| 322 | config, |
| 323 | server?.watcher, |
| 324 | ) |
| 325 | if (jsxInject && jsxExtensionsRE.test(id)) { |
| 326 | result.code = jsxInject + ';' + result.code |
| 327 | } |
| 328 | for (const warning of result.warnings) { |
| 329 | if (!shouldSkipWarning(warning)) { |
| 330 | this.warn(warning) |
| 331 | } |
| 332 | } |
| 333 | return { |
| 334 | code: result.code, |
| 335 | map: result.map, |
| 336 | moduleType: 'js', |
| 337 | } |
| 338 | } |
| 339 | }, |
| 340 | } |
| 341 | } |
| 342 |
no test coverage detected