tsdown-config-silverwind 1.0.4 → 1.1.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
@@ -3,19 +3,26 @@ import { fileURLToPath } from "node:url";
3
3
  //#region index.ts
4
4
  const base = ({ url,...other }) => ({
5
5
  entry: fileURLToPath(new URL("index.ts", url)),
6
+ report: {
7
+ gzip: false,
8
+ brotli: false
9
+ },
6
10
  ...other
7
11
  });
8
12
  function nodeLib({ url,...other }) {
9
13
  return base({
10
14
  platform: "node",
11
- report: {
12
- gzip: false,
13
- brotli: false
14
- },
15
+ url,
16
+ ...other
17
+ });
18
+ }
19
+ function webLib({ url,...other }) {
20
+ return base({
21
+ platform: "browser",
15
22
  url,
16
23
  ...other
17
24
  });
18
25
  }
19
26
 
20
27
  //#endregion
21
- export { nodeLib };
28
+ 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.1.0",
4
4
  "description": "Shared tsdown configuration",
5
5
  "author": "silverwind <me@silverwind.io>",
6
6
  "repository": "silverwind/tsdown-config-silverwind",