forked from finos/architecture-as-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
46 lines (45 loc) · 1.44 KB
/
Copy pathtsup.config.ts
File metadata and controls
46 lines (45 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig } from 'tsup'
export default defineConfig([
// Extension (Node environment)
{
entry: { extension: 'src/extension.ts' },
platform: 'node',
target: 'node18',
format: ['cjs'],
sourcemap: true,
clean: true,
dts: false,
// Bundle runtime dependencies into the extension so the installed VSIX does
// not rely on node_modules being present in the target environment.
// Keep 'vscode' external (provided by the host). 'playwright-core' is also
// external: it's only required lazily by Docifier's --export-diagrams path
// (never used by the extension), and bundling it fails (esbuild can't
// resolve playwright-core's chromium-bidi subpath imports).
external: ['vscode', 'playwright-core'],
noExternal: [
'yaml',
'lodash',
'@finos/calm-shared',
'@finos/calm-models',
'markdown-it',
'mermaid',
'jsdom',
'zustand'
],
minify: false,
outDir: 'dist',
},
// Webview (Browser environment)
{
entry: { 'webview/main': 'src/features/preview/webview/main.ts' },
platform: 'browser',
target: 'es2020',
format: ['iife'],
globalName: 'CalmWebview',
sourcemap: true,
clean: false,
dts: false,
minify: false,
outDir: 'dist'
}
])