From 943cb3fa76f066fdc85110672d2f46e5b7902b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=9D=E5=BF=A0?= Date: Wed, 26 Aug 2020 17:05:03 +0800 Subject: [PATCH 1/2] fix: miniapp env --- packages/create-app-shared/package.json | 2 +- packages/create-app-shared/src/env.ts | 4 ++-- packages/plugin-app-core/package.json | 2 +- .../src/generator/templates/common/runApp.ts.ejs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/create-app-shared/package.json b/packages/create-app-shared/package.json index b959e88152..f865845392 100644 --- a/packages/create-app-shared/package.json +++ b/packages/create-app-shared/package.json @@ -1,6 +1,6 @@ { "name": "create-app-shared", - "version": "0.1.9", + "version": "0.1.10", "description": "", "author": "ice-admin@alibaba-inc.com", "homepage": "https://github.com/alibaba/ice#readme", diff --git a/packages/create-app-shared/src/env.ts b/packages/create-app-shared/src/env.ts index b704883410..08fdfd6f1c 100644 --- a/packages/create-app-shared/src/env.ts +++ b/packages/create-app-shared/src/env.ts @@ -1,4 +1,4 @@ -import { isMiniApp, isWeChatMiniProgram, isByteDanceMicroApp } from 'universal-env'; +import { isMiniApp, isWeChatMiniProgram, isByteDanceMicroApp, isWeb } from 'universal-env'; -export const isMiniAppPlatform = isMiniApp || isWeChatMiniProgram || isByteDanceMicroApp; +export const isMiniAppPlatform = (isMiniApp || isWeChatMiniProgram || isByteDanceMicroApp) && !isWeb; export * from 'universal-env'; diff --git a/packages/plugin-app-core/package.json b/packages/plugin-app-core/package.json index 965c207e66..0805bbd97f 100644 --- a/packages/plugin-app-core/package.json +++ b/packages/plugin-app-core/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-app-core", - "version": "0.1.12", + "version": "0.1.13", "description": "the core plugin for icejs and raxjs.", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-app-core/src/generator/templates/common/runApp.ts.ejs b/packages/plugin-app-core/src/generator/templates/common/runApp.ts.ejs index 06a1d18e9f..b90e8b6064 100644 --- a/packages/plugin-app-core/src/generator/templates/common/runApp.ts.ejs +++ b/packages/plugin-app-core/src/generator/templates/common/runApp.ts.ejs @@ -1,5 +1,5 @@ import { createElement, useEffect, Component } from '<%- framework %>'; -import { isMiniApp, isWeChatMiniProgram, isByteDanceMicroApp } from 'universal-env'; +import { isMiniApp, isWeChatMiniProgram, isByteDanceMicroApp, isWeb } from 'universal-env'; import miniappRenderer from 'miniapp-renderer'; import createShareAPI, { history } from 'create-app-shared'; @@ -51,7 +51,7 @@ export function runApp(appConfig) { <% if(isRax){ %> renderer = raxAppRenderer; <% } %> - if (isMiniApp || isWeChatMiniProgram || isByteDanceMicroApp) { + if ((isMiniApp || isWeChatMiniProgram || isByteDanceMicroApp) && !isWeb) { renderer = miniappRenderer; }<% if(isReact){ %> else { renderer = reactAppRenderer; From da3867f48b2c1de8896ad97eb76f0997cc7a4f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=9D=E5=BF=A0?= Date: Wed, 26 Aug 2020 17:13:17 +0800 Subject: [PATCH 2/2] chore: update version --- packages/icejs/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/icejs/package.json b/packages/icejs/package.json index 28ab03fc0f..ab586d27ea 100644 --- a/packages/icejs/package.json +++ b/packages/icejs/package.json @@ -1,6 +1,6 @@ { "name": "ice.js", - "version": "1.8.0", + "version": "1.8.1", "description": "command line interface and builtin plugin for icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", @@ -26,7 +26,7 @@ "dependencies": { "@alib/build-scripts": "^0.1.13", "build-plugin-ice-config": "1.7.0", - "build-plugin-app-core": "0.1.12", + "build-plugin-app-core": "0.1.13", "build-plugin-ice-helpers": "1.7.0", "build-plugin-ice-logger": "1.7.0", "build-plugin-ice-mpa": "1.7.0",