@lark-apaas/coding-html-devserver 0.1.6-alpha.1 → 0.1.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/vite-config.d.ts +2 -0
- package/lib/vite-config.js +6 -2
- package/package.json +1 -1
package/lib/vite-config.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface HtmlViteOptions {
|
|
|
16
16
|
* 配套 `basePathRewritePlugin` 处理无尾斜杠(`/app/<id>` → `/app/<id>/`)的内部 rewrite。
|
|
17
17
|
* 无 `CLIENT_BASE_PATH` 时 base 退化为 `/`(本地裸 dev 不受影响)。
|
|
18
18
|
* - HMR 走 vite 的 WS:`MIAODA_WS_HOST` 存在时切独立 WS 域名(对齐 vite-react 网关方案)。
|
|
19
|
+
* 两种分支都设 `overlay: false`,关掉 JS 解析/编译失败时的错误红屏遮罩(沙箱不给终端
|
|
20
|
+
* 用户看红屏,报错仍在浏览器 console)。
|
|
19
21
|
* - `appType: 'mpa'`:纯静态多页,不做 SPA history fallback。
|
|
20
22
|
* - 内置 health + 平台注入 + WS 韧性插件(vite-client-patch / ws-watchdog)+ base-path rewrite
|
|
21
23
|
* + runtime-url-fix(撕掉 vite 给后端运行时绝对 URL 误加的 base 前缀)。
|
package/lib/vite-config.js
CHANGED
|
@@ -23,6 +23,8 @@ const normalize_base_path_1 = require("./normalize-base-path");
|
|
|
23
23
|
* 配套 `basePathRewritePlugin` 处理无尾斜杠(`/app/<id>` → `/app/<id>/`)的内部 rewrite。
|
|
24
24
|
* 无 `CLIENT_BASE_PATH` 时 base 退化为 `/`(本地裸 dev 不受影响)。
|
|
25
25
|
* - HMR 走 vite 的 WS:`MIAODA_WS_HOST` 存在时切独立 WS 域名(对齐 vite-react 网关方案)。
|
|
26
|
+
* 两种分支都设 `overlay: false`,关掉 JS 解析/编译失败时的错误红屏遮罩(沙箱不给终端
|
|
27
|
+
* 用户看红屏,报错仍在浏览器 console)。
|
|
26
28
|
* - `appType: 'mpa'`:纯静态多页,不做 SPA history fallback。
|
|
27
29
|
* - 内置 health + 平台注入 + WS 韧性插件(vite-client-patch / ws-watchdog)+ base-path rewrite
|
|
28
30
|
* + runtime-url-fix(撕掉 vite 给后端运行时绝对 URL 误加的 base 前缀)。
|
|
@@ -58,9 +60,11 @@ function createHtmlViteConfig(opts = {}) {
|
|
|
58
60
|
strictPort: true,
|
|
59
61
|
cors: true,
|
|
60
62
|
allowedHosts: true,
|
|
63
|
+
// overlay: false —— 关掉 vite 的错误红屏遮罩(JS 解析/编译失败时的全屏弹窗)。
|
|
64
|
+
// 沙箱场景不给终端用户看红屏,报错仍保留在浏览器 console。
|
|
61
65
|
hmr: process.env.MIAODA_WS_HOST
|
|
62
|
-
? { protocol: 'wss', host: process.env.MIAODA_WS_HOST, clientPort: 443, path: '/ws' }
|
|
63
|
-
: { path: '/ws' },
|
|
66
|
+
? { protocol: 'wss', host: process.env.MIAODA_WS_HOST, clientPort: 443, path: '/ws', overlay: false }
|
|
67
|
+
: { path: '/ws', overlay: false },
|
|
64
68
|
},
|
|
65
69
|
plugins: [
|
|
66
70
|
(0, raw_jsx_1.rawJsxPlugin)({ root, clientBasePath }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/coding-html-devserver",
|
|
3
|
-
"version": "0.1.6-
|
|
3
|
+
"version": "0.1.6-beta.0",
|
|
4
4
|
"description": "Dev/build toolchain for the miaoda-coding html (pure HTML) stack. Wraps vite (dev + HMR) behind a bin so the template never sees vite; build is pure-copy + platform-script injection + optional minify.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|