ensis-ui 3.0.0 → 3.0.1
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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.0.1] - 2026-10-15
|
|
10
|
+
|
|
11
|
+
### 修复
|
|
12
|
+
|
|
13
|
+
- `ensisUiHost`:npm 发布桶没有 `src/` 时,`pnpm dev` 不再把包根具名导入改写成 `exports` 未声明的子路径(如 `@niuma/ui/theme/apply.js`),避免 Vite `Missing "./…" specifier`。只有 `link:` 带源码时才改写到 `src` 做 HMR。
|
|
14
|
+
|
|
9
15
|
## [3.0.0] - 2026-10-11
|
|
10
16
|
|
|
11
17
|
### 变更
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 第一方宿主插件:只服务 pnpm dev
|
|
3
|
-
* vite build / CI
|
|
2
|
+
* 第一方宿主插件:只服务 pnpm dev + link 源码(HMR、styles alias)。
|
|
3
|
+
* 发布桶(无 src)与 vite build / CI:走包主入口,不改写导入。
|
|
4
4
|
* 禁止把 @niuma/ui 别名到 src/index.ts(评估整桶会灌入未使用组件 CSS)。
|
|
5
5
|
*
|
|
6
6
|
* 写法:工厂 + options、createFilter、es-module-lexer 定位静态 import/export、
|
|
@@ -121,6 +121,9 @@ function ensisUiHostRewrite(ctx) {
|
|
|
121
121
|
ctx.map = loadRuntimeBindings(ctx.root, ctx.useSource);
|
|
122
122
|
},
|
|
123
123
|
async transform(code, id) {
|
|
124
|
+
// 发布桶没有 src:保持包根具名导入,勿改成未在 exports 里的子路径。
|
|
125
|
+
if (!ctx.useSource)
|
|
126
|
+
return null;
|
|
124
127
|
if (!ctx.filter(id))
|
|
125
128
|
return null;
|
|
126
129
|
if (!code.includes('@niuma/ui') && !code.includes('niuma-ui') && !code.includes('ensis-ui'))
|