Skip to content

Commit

Permalink
fix: sometimes THIS_IS_UNDEFINED warnings were still shown (#4844)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroslav Dobzhanskij committed Sep 6, 2021
1 parent 46ecda4 commit 8d956f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vite/src/node/plugins/worker.ts
Expand Up @@ -7,6 +7,7 @@ import { cleanUrl, injectQuery } from '../utils'
import Rollup from 'rollup'
import { ENV_PUBLIC_PATH } from '../constants'
import path from 'path'
import { onRollupWarning } from '../build'

function parseWorkerRequest(id: string): Record<string, string> | null {
const { search } = parseUrl(id)
Expand Down Expand Up @@ -56,7 +57,10 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
const rollup = require('rollup') as typeof Rollup
const bundle = await rollup.rollup({
input: cleanUrl(id),
plugins: await resolvePlugins({ ...config }, [], [], [])
plugins: await resolvePlugins({ ...config }, [], [], []),
onwarn(warning, warn) {
onRollupWarning(warning, warn, config)
},
})
let code: string
try {
Expand Down

0 comments on commit 8d956f6

Please sign in to comment.