diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68ced4f..4402790 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [14.x, 16.x] steps: - uses: actions/checkout@v2 diff --git a/src/globalState.ts b/src/globalState.ts index 6e47cf3..d2709cd 100644 --- a/src/globalState.ts +++ b/src/globalState.ts @@ -20,6 +20,10 @@ function emitGlobal(state: Record, prevState: Record) } export function initGlobalState(state: Record = {}) { + if (process.env.NODE_ENV === 'development') { + console.warn(`[qiankun] globalState tools will be removed in 3.0, pls don't use it!`); + } + if (state === globalState) { console.warn('[qiankun] state has not changed!'); } else { diff --git a/src/loader.ts b/src/loader.ts index 828c7f0..0363017 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -156,8 +156,8 @@ function getRender(appName: string, appContent: string, legacyRender?: HTMLConte const render: ElementRender = ({ element, loading, container }, phase) => { if (legacyRender) { if (process.env.NODE_ENV === 'development') { - console.warn( - '[qiankun] Custom rendering function is deprecated, you can use the container element setting instead!', + console.error( + '[qiankun] Custom rendering function is deprecated and will be removed in 3.0, you can use the container element setting instead!', ); } @@ -275,6 +275,13 @@ export async function loadApp( const appContent = getDefaultTplWrapper(appInstanceId, appName)(template); const strictStyleIsolation = typeof sandbox === 'object' && !!sandbox.strictStyleIsolation; + + if (process.env.NODE_ENV === 'development' && strictStyleIsolation) { + console.warn( + "[qiankun] strictStyleIsolation configuration will be removed in 3.0, pls don't depend on it or use experimentalStyleIsolation instead!", + ); + } + const scopedCSS = isEnableScopedCSS(sandbox); let initialAppWrapperElement: HTMLElement | null = createElement( appContent,