markdown-it-any-block 3.3.9-beta1 → 3.4.4-beta2

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/vite.config.ts CHANGED
@@ -11,13 +11,24 @@ export default defineConfig({
11
11
  minify: false, // 禁用代码压缩,包括混淆
12
12
  sourcemap: true,
13
13
  lib: {
14
- entry: './index.ts',
14
+ entry: {
15
+ index: './index.ts',
16
+ node: './node/index.ts'
17
+ },
15
18
 
16
19
  name: 'MdItAnyBlock',
17
20
  formats: ['es', 'cjs'], // ['es', 'cjs']
18
- fileName: (format) => format == 'es'
19
- ? `mdit-any-block.js`
20
- : `mdit-any-block.cjs`,
21
+ fileName: (format, entryName) => {
22
+ if (entryName === 'index') return format == 'es'
23
+ ? `mdit-any-block.js`
24
+ : `mdit-any-block.cjs`
25
+ else if (entryName === 'node') return format == 'es'
26
+ ? `mdit-any-block.node.js`
27
+ : `mdit-any-block.node.cjs`
28
+ return format == 'es'
29
+ ? `${entryName}.${format}.js`
30
+ : `${entryName}.${format}.cjs`
31
+ }
21
32
  },
22
33
  rollupOptions: {
23
34
  // 确保您的库与其他包兼容