fix(vite): remove global replacement (#1835)

This commit is contained in:
pooya parsa 2021-11-10 21:15:26 +01:00 committed by GitHub
parent 89aa7aa303
commit 6eb4040b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -17,7 +17,6 @@ export async function buildClient (ctx: ViteBuildContext) {
const clientConfig: vite.InlineConfig = vite.mergeConfig(ctx.config, { const clientConfig: vite.InlineConfig = vite.mergeConfig(ctx.config, {
define: { define: {
global: 'globalThis',
'process.client': 'true', 'process.client': 'true',
'process.server': 'false', 'process.server': 'false',
'process.static': 'false', 'process.static': 'false',

View File

@ -17,8 +17,7 @@ export async function buildClient (ctx: ViteBuildContext) {
define: { define: {
'process.server': false, 'process.server': false,
'process.client': true, 'process.client': true,
'module.hot': false, 'module.hot': false
global: 'globalThis'
}, },
resolve: { resolve: {
alias: { alias: {