-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Copy link
Labels
Description
Describe the bug
When running unit tests, I'm seeing a warning:
Both esbuild and oxc options were set. oxc options will be used and esbuild options will be ignored. The following esbuild options were set: `{ legalComments: 'inline' }`
The thing is, neither in my vitest.config.ts nor vite.config.ts I have esbuild.legalComments option set. I only have build.rolldownOptions.output.legalComments set.
I believe this comes from the following default:
vitest/packages/browser/src/node/plugin.ts
Lines 358 to 361 in 0c2c013
| if (viteConfig.esbuild !== false) { | |
| viteConfig.esbuild ||= {} | |
| viteConfig.esbuild.legalComments = 'inline' | |
| } |
but following intuition and setting esbuild: false in my Vitest config, I just get a different warning:
`esbuild` option is set to false, but `oxc` option was not set to false. `esbuild: false` does not have effect any more. If you want to disable the default transformation, which is now handled by Oxc, please set `oxc: false` instead.
Reproduction
I believe I have provided sufficient information for this bug to be resolved. If I'm mistaken, please let me know!
System Info
System:
OS: macOS 26.3
CPU: (10) arm64 Apple M1 Max
Memory: 834.45 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.11.1 - /usr/local/bin/node
Yarn: 4.10.3 - /Users/wojciech.maj/.yarn/switch/bin/yarn
npm: 11.6.2 - /usr/local/bin/npm
Browsers:
Chrome: 144.0.7559.134
Firefox: 141.0.3
Safari: 26.3Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable