Skip to content

Commit

Permalink
fix: browser to preserve coverage ignore hints comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Mar 24, 2023
1 parent 7fc4216 commit 7f476a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/browser/src/node/index.ts
Expand Up @@ -18,6 +18,11 @@ export default (base = '/'): Plugin[] => {
{
enforce: 'pre',
name: 'vitest:browser',
async config(viteConfig) {
// Enables using ignore hint for coverage providers with @preserve keyword
viteConfig.esbuild ||= {}
viteConfig.esbuild.legalComments = 'inline'
},
async configureServer(server) {
server.middlewares.use(
base,
Expand Down

0 comments on commit 7f476a4

Please sign in to comment.