@viocha/esm-pkg 1.3.2 → 1.4.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/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
  - 一次命令构建全部 bundle
20
20
  - 多个库会合并默认导出和命名导出
21
21
  - 单模块 bundle 会保留原包的默认导出形态
22
- - `exclude` 会转成 external,不打进当前产物
22
+ - `excludes` 会转成 external,不打进当前产物
23
23
  - 自动生成 `examples/index.html` 使用的数据文件
24
24
  - 对 React 相关包做了两条自动补入规则:
25
25
  - 声明 `react` 时,自动补入 `react/jsx-runtime` 和 `react/jsx-dev-runtime`
@@ -55,32 +55,32 @@ pnpm build
55
55
  export default [
56
56
  {
57
57
  modules: ["react", "react-dom"],
58
- exclude: [],
58
+ excludes: [],
59
59
  outFile: "dist/react-all.js"
60
60
  },
61
61
  {
62
62
  modules: ["antd"],
63
- exclude: ["react", "react-dom"],
63
+ excludes: ["react", "react-dom"],
64
64
  outFile: "dist/antd.js"
65
65
  },
66
66
  {
67
67
  modules: ["@ant-design/icons"],
68
- exclude: ["react", "react-dom"],
68
+ excludes: ["react", "react-dom"],
69
69
  outFile: "dist/ant-design-icons.js"
70
70
  },
71
71
  {
72
72
  modules: ["clsx"],
73
- exclude: [],
73
+ excludes: [],
74
74
  outFile: "dist/clsx.js"
75
75
  },
76
76
  {
77
77
  modules: ["lucide-react"],
78
- exclude: ["react"],
78
+ excludes: ["react"],
79
79
  outFile: "dist/lucide-react.js"
80
80
  },
81
81
  {
82
82
  modules: ["htm"],
83
- exclude: [],
83
+ excludes: [],
84
84
  outFile: "dist/htm.js"
85
85
  }
86
86
  ];
@@ -89,7 +89,7 @@ export default [
89
89
  ### 字段说明
90
90
 
91
91
  - `modules`: 要打进当前 bundle 的包列表
92
- - `exclude`: 不打包、保留为外部依赖的包列表
92
+ - `excludes`: 不打包、保留为外部依赖的包列表
93
93
  - `outFile`: 输出文件路径
94
94
 
95
95
  ### 合并规则
@@ -119,16 +119,16 @@ import ReactAll, { createElement, createRoot, jsx } from "./dist/react-all.js";
119
119
  - `ReactAll` 是聚合后的默认导出对象
120
120
  - `createElement`、`createRoot`、`jsx` 是平铺后的命名导出
121
121
 
122
- ## `exclude` 规则
122
+ ## `excludes` 规则
123
123
 
124
- `exclude` 中的包会作为外部依赖保留在输出里,不会被打进当前文件。
124
+ `excludes` 中的包会作为外部依赖保留在输出里,不会被打进当前文件。
125
125
 
126
126
  例如:
127
127
 
128
128
  ```js
129
129
  {
130
130
  modules: ["antd"],
131
- exclude: ["react", "react-dom"],
131
+ excludes: ["react", "react-dom"],
132
132
  outFile: "dist/antd.js"
133
133
  }
134
134
  ```