taro-form-react 0.0.1 → 0.0.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/rollup.config.mjs +10 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "taro-form-react",
3
3
  "description": "A form component for Taro 3.x based on React",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "browser": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "main": "dist/index.js",
@@ -53,4 +53,4 @@
53
53
  "react": "^18",
54
54
  "react-dom": "^18"
55
55
  }
56
- }
56
+ }
package/rollup.config.mjs CHANGED
@@ -38,7 +38,15 @@ export default {
38
38
  plugins: [
39
39
  resolve(),
40
40
  commonjs(),
41
- typescript(),
41
+ typescript({
42
+ useTsconfigDeclarationDir: true, // 使用 TypeScript 配置中的声明文件目录
43
+ tsconfigOverride: {
44
+ compilerOptions: {
45
+ declaration: true, // 生成声明文件
46
+ declarationDir: "dist/types", // 声明文件输出目录
47
+ },
48
+ },
49
+ }),
42
50
  terser(),
43
51
  copy({
44
52
  targets: [
@@ -50,4 +58,4 @@ export default {
50
58
  verbose: true,
51
59
  }),
52
60
  ],
53
- };
61
+ };