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