tsdown-config-silverwind 1.0.4 → 1.2.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/dist/index.d.ts CHANGED
@@ -1,12 +1,16 @@
1
1
  import { Options } from "tsdown";
2
2
 
3
3
  //#region index.d.ts
4
- type CustomConfig = {
4
+ type CustomConfig = Options & {
5
5
  url: string;
6
- } & Options;
6
+ };
7
7
  declare function nodeLib({
8
8
  url,
9
9
  ...other
10
10
  }: CustomConfig): Options;
11
+ declare function webLib({
12
+ url,
13
+ ...other
14
+ }: CustomConfig): Options;
11
15
  //#endregion
12
- export { CustomConfig, nodeLib };
16
+ export { CustomConfig, nodeLib, webLib };
package/dist/index.js CHANGED
@@ -1,21 +1,30 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
 
3
3
  //#region index.ts
4
- const base = ({ url,...other }) => ({
5
- entry: fileURLToPath(new URL("index.ts", url)),
6
- ...other
7
- });
8
- function nodeLib({ url,...other }) {
9
- return base({
10
- platform: "node",
4
+ const base = ({ url,...other }) => {
5
+ return {
6
+ entry: fileURLToPath(new URL("index.ts", url)),
11
7
  report: {
12
8
  gzip: false,
13
9
  brotli: false
14
10
  },
11
+ ...other
12
+ };
13
+ };
14
+ function nodeLib({ url,...other }) {
15
+ return base({
16
+ platform: "node",
17
+ url,
18
+ ...other
19
+ });
20
+ }
21
+ function webLib({ url,...other }) {
22
+ return base({
23
+ platform: "browser",
15
24
  url,
16
25
  ...other
17
26
  });
18
27
  }
19
28
 
20
29
  //#endregion
21
- export { nodeLib };
30
+ export { nodeLib, webLib };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown-config-silverwind",
3
- "version": "1.0.4",
3
+ "version": "1.2.0",
4
4
  "description": "Shared tsdown configuration",
5
5
  "author": "silverwind <me@silverwind.io>",
6
6
  "repository": "silverwind/tsdown-config-silverwind",
@@ -14,7 +14,7 @@
14
14
  "dist"
15
15
  ],
16
16
  "engines": {
17
- "node": ">=24"
17
+ "node": ">=20"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "24.5.2",