Skip to content

Commit

Permalink
fix(browser): don't override the esbuild option in the browser mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Oct 11, 2024
1 parent 19d64e2 commit d131fd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/browser/src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ export default (browserServer: BrowserServer, base = '/'): Plugin[] => {
enforce: 'post',
async config(viteConfig) {
// Enables using ignore hint for coverage providers with @preserve keyword
viteConfig.esbuild ||= {}
viteConfig.esbuild.legalComments = 'inline'
if (viteConfig.esbuild !== false) {
viteConfig.esbuild ||= {}
viteConfig.esbuild.legalComments = 'inline'
}

const server = resolveApiServerConfig(
viteConfig.test?.browser || {},
Expand Down

0 comments on commit d131fd6

Please sign in to comment.