✨ add qiankun runtime variable (#1057)
This commit is contained in:
parent
44726a22b6
commit
72d3a40599
|
|
@ -4,6 +4,7 @@ node_js:
|
|||
install:
|
||||
- yarn install
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- node_modules
|
||||
script:
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@
|
|||
"father-build": "^1.7.0",
|
||||
"husky": "^2.3.0",
|
||||
"jest": "^25.2.2",
|
||||
"levenary": "^1.1.1",
|
||||
"lint-staged": "^9.4.2",
|
||||
"np": "^5.0.3",
|
||||
"npm-run-all": "^4.1.5",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ declare global {
|
|||
interface Window {
|
||||
__POWERED_BY_QIANKUN__?: boolean;
|
||||
__INJECTED_PUBLIC_PATH_BY_QIANKUN__?: string;
|
||||
__QIANKUN_DEVELOPMENT__?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function uniq(array: PropertyKey[]) {
|
|||
const rawObjectDefineProperty = Object.defineProperty;
|
||||
|
||||
const variableWhiteListInDev =
|
||||
process.env.NODE_ENV === 'development'
|
||||
process.env.NODE_ENV === 'development' || window.__QIANKUN_DEVELOPMENT__
|
||||
? [
|
||||
// for react hot reload
|
||||
// see https://github.com/facebook/create-react-app/blob/66bf7dfc43350249e2f09d138a20840dae8a0a4a/packages/react-error-overlay/src/index.js#L180
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user