Przeglądaj źródła

fix(material): tsup bundle (#598)

* fix(material): tsup bundle

* feat: license
Yiwei Mao 5 miesięcy temu
rodzic
commit
9e8829a4f2

+ 1 - 1
packages/materials/form-materials/package.json

@@ -22,7 +22,7 @@
   ],
   "scripts": {
     "build": "npm run build:fast -- --dts-resolve",
-    "build:fast": "tsup src/index.ts --format esm --sourcemap --legacy-output",
+    "build:fast": "tsup src/index.ts --format cjs,esm --sourcemap --legacy-output",
     "build:watch": "npm run build:fast -- --dts-resolve",
     "clean": "rimraf dist",
     "test": "exit 0",

+ 11 - 0
packages/materials/form-materials/tsup.config.js

@@ -0,0 +1,11 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import { defineConfig } from 'tsup';
+
+export default defineConfig({
+  // https://tsup.egoist.dev/#inject-cjs-and-esm-shims
+  shims: true,
+});