@lssm/tool.tsdown 0.11.0 → 1.41.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/index.js +11 -67
- package/package.json +5 -2
package/index.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { defineConfig } from 'tsdown';
|
|
2
2
|
|
|
3
|
+
export const withDevExports = {
|
|
4
|
+
exports: {
|
|
5
|
+
all: true,
|
|
6
|
+
devExports: true,
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
3
10
|
const obfuscation = defineConfig({
|
|
4
11
|
minify: {
|
|
5
12
|
compress: {
|
|
@@ -20,18 +27,14 @@ const obfuscation = defineConfig({
|
|
|
20
27
|
export const base = defineConfig({
|
|
21
28
|
exports: {
|
|
22
29
|
all: true,
|
|
23
|
-
devExports:
|
|
30
|
+
devExports: true,
|
|
24
31
|
},
|
|
25
32
|
clean: true,
|
|
26
33
|
sourcemap: false,
|
|
27
34
|
format: ['esm'],
|
|
28
|
-
// format: ['esm', 'cjs'],
|
|
29
|
-
// format: ['esm'],
|
|
30
35
|
target: 'esnext',
|
|
31
|
-
// Let packages add their own externals; keep common ones minimal.
|
|
32
|
-
external: [],
|
|
33
36
|
|
|
34
|
-
dts:
|
|
37
|
+
dts: false,
|
|
35
38
|
// bundle: false,
|
|
36
39
|
unbundle: true,
|
|
37
40
|
splitting: false,
|
|
@@ -46,61 +49,9 @@ export const base = defineConfig({
|
|
|
46
49
|
],
|
|
47
50
|
});
|
|
48
51
|
|
|
49
|
-
const sharedExternal = [
|
|
50
|
-
'next',
|
|
51
|
-
'next/headers',
|
|
52
|
-
'next/navigation',
|
|
53
|
-
'next/link',
|
|
54
|
-
'react',
|
|
55
|
-
'react-dom',
|
|
56
|
-
'react-native',
|
|
57
|
-
'server-only',
|
|
58
|
-
'@lssm/lib.ui-kit-web',
|
|
59
|
-
'@lssm/lib.ui-kit',
|
|
60
|
-
'@lssm/lib.ui-kit/*',
|
|
61
|
-
'@lssm/lib.ui-kit-web/*',
|
|
62
|
-
'@lssm/lib.ui-kit-web/ui/*',
|
|
63
|
-
'lucide-react',
|
|
64
|
-
'lucide-react-native',
|
|
65
|
-
'react-native',
|
|
66
|
-
'react-native-safe-area-context',
|
|
67
|
-
'expo',
|
|
68
|
-
'expo-router',
|
|
69
|
-
'@prisma/adapter-pg',
|
|
70
|
-
'pg',
|
|
71
|
-
'graphql',
|
|
72
|
-
'elysia',
|
|
73
|
-
'posthog-node',
|
|
74
|
-
'posthog-js',
|
|
75
|
-
'posthog',
|
|
76
|
-
'posthog-browser',
|
|
77
|
-
'posthog-react',
|
|
78
|
-
'posthog-react-native',
|
|
79
|
-
'jotai',
|
|
80
|
-
'jotai-tanstack-query',
|
|
81
|
-
'@tanstack/query-core',
|
|
82
|
-
'@tanstack/react-query',
|
|
83
|
-
'@tanstack/react-query-devtools',
|
|
84
|
-
'@sentry/nextjs',
|
|
85
|
-
'react-map-gl',
|
|
86
|
-
'react-map-gl/maplibre',
|
|
87
|
-
'maplibre-gl',
|
|
88
|
-
'node:buffer',
|
|
89
|
-
'node:timers/promises',
|
|
90
|
-
'node:crypto',
|
|
91
|
-
'node:assert',
|
|
92
|
-
'node:url',
|
|
93
|
-
'@google-cloud/secret-manager',
|
|
94
|
-
'@google-cloud/storage',
|
|
95
|
-
'@google-cloud/pubsub',
|
|
96
|
-
'googleapis',
|
|
97
|
-
'postmark',
|
|
98
|
-
];
|
|
99
|
-
|
|
100
52
|
export const reactLibrary = defineConfig({
|
|
101
53
|
...base,
|
|
102
54
|
format: ['esm'],
|
|
103
|
-
external: [...sharedExternal],
|
|
104
55
|
minify: false,
|
|
105
56
|
platform: 'browser',
|
|
106
57
|
});
|
|
@@ -108,13 +59,7 @@ export const reactLibrary = defineConfig({
|
|
|
108
59
|
export const moduleLibrary = defineConfig({
|
|
109
60
|
...base,
|
|
110
61
|
format: ['esm'],
|
|
111
|
-
external: [...sharedExternal],
|
|
112
62
|
platform: 'neutral',
|
|
113
|
-
exports: {
|
|
114
|
-
all: true,
|
|
115
|
-
devExports: false,
|
|
116
|
-
},
|
|
117
|
-
skipNodeModulesBundle: true,
|
|
118
63
|
...obfuscation,
|
|
119
64
|
});
|
|
120
65
|
|
|
@@ -123,7 +68,6 @@ export const nodeLib = defineConfig({
|
|
|
123
68
|
format: ['esm'],
|
|
124
69
|
// format: ['esm', 'cjs'],
|
|
125
70
|
platform: 'node',
|
|
126
|
-
external: [...sharedExternal],
|
|
127
71
|
...obfuscation,
|
|
128
72
|
});
|
|
129
73
|
|
|
@@ -133,8 +77,8 @@ export const nodeDatabaseLib = defineConfig({
|
|
|
133
77
|
platform: 'node',
|
|
134
78
|
// platform: 'neutral',
|
|
135
79
|
unbundle: true,
|
|
136
|
-
|
|
137
|
-
|
|
80
|
+
// ...obfuscation,
|
|
81
|
+
entry: ['src/index.ts', 'src/client.ts', 'src/enums.ts', 'src/models.ts'],
|
|
138
82
|
});
|
|
139
83
|
|
|
140
84
|
export default defineConfig((_options) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/tool.tsdown",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared tsdown config presets for LSSM monorepo",
|
|
6
6
|
"exports": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"tsdown": "^0.
|
|
14
|
+
"tsdown": "^0.17.4"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
15
18
|
}
|
|
16
19
|
}
|