Browse Source

fix(): Fix vite profile hot update error reporting (#968)

修复vite修改配置文件热更新报错Error: Must provide a proper URL as target

Co-authored-by: lou <825681860@qq.com>
pull/972/head
loujohn 5 years ago
committed by GitHub
parent
commit
956ed2e3f7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      build/utils.ts

6
build/utils.ts

@ -34,7 +34,11 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
} catch (error) {}
}
ret[envName] = realName;
process.env[envName] = realName;
if (typeof realName === 'string') {
process.env[envName] = realName;
} else if (typeof realName === 'object') {
process.env[envName] = JSON.stringify(realName);
}
}
return ret;
}

Loading…
Cancel
Save