Skip to content

Commit

Permalink
fix(build): let top-level this refer to globalThis (#5312)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Oct 21, 2021
1 parent 269a1b6 commit 7e25429
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vite/src/node/build.ts
Expand Up @@ -422,6 +422,7 @@ async function doBuild(
const rollup = require('rollup') as typeof Rollup
const rollupOptions: RollupOptions = {
input,
context: 'globalThis',
preserveEntrySignatures: ssr
? 'allow-extension'
: libOptions
Expand Down

0 comments on commit 7e25429

Please sign in to comment.