@tnotesjs/core 0.4.1 → 0.4.2
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.
|
@@ -28,7 +28,8 @@ var DEFAULT_OPTIMIZE_DEPS_INCLUDE = [
|
|
|
28
28
|
// Mermaid 11 的 ESM chunk 默认导入 CommonJS fastdom。pnpm 的严格
|
|
29
29
|
// 依赖布局下 Vite 无法从知识库根目录自动发现这条嵌套依赖,开发
|
|
30
30
|
// 模式会直接把 fastdom.js 当作 ESM 加载并导致整页白屏。
|
|
31
|
-
"@tnotesjs/core > mermaid > fastdom"
|
|
31
|
+
"@tnotesjs/core > mermaid > fastdom",
|
|
32
|
+
"@tnotesjs/core > mermaid > fastdom/extensions/fastdom-promised.js"
|
|
32
33
|
];
|
|
33
34
|
|
|
34
35
|
// vitepress/configs/constants.ts
|
package/package.json
CHANGED
|
@@ -4,8 +4,11 @@ import { DEFAULT_OPTIMIZE_DEPS_INCLUDE } from './dependencyOptimization'
|
|
|
4
4
|
|
|
5
5
|
describe('Vite dependency optimization', () => {
|
|
6
6
|
it('pre-bundles Mermaid nested CommonJS fastdom dependency', () => {
|
|
7
|
-
expect(DEFAULT_OPTIMIZE_DEPS_INCLUDE).
|
|
8
|
-
|
|
7
|
+
expect(DEFAULT_OPTIMIZE_DEPS_INCLUDE).toEqual(
|
|
8
|
+
expect.arrayContaining([
|
|
9
|
+
'@tnotesjs/core > mermaid > fastdom',
|
|
10
|
+
'@tnotesjs/core > mermaid > fastdom/extensions/fastdom-promised.js',
|
|
11
|
+
]),
|
|
9
12
|
)
|
|
10
13
|
})
|
|
11
14
|
})
|