-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
41 lines (40 loc) · 1.08 KB
/
tsdown.config.ts
File metadata and controls
41 lines (40 loc) · 1.08 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
import { defineConfig } from 'tsdown'
import babel from '@rolldown/plugin-babel'
import { lingui } from '@lingui/vite-plugin'
export default defineConfig({
entry: [
'src/main/main.ts',
'src/main/preload.ts',
'src/main/locales/**/messages.ts',
],
platform: 'node',
format: 'esm',
target: 'node24.14', // electron version target
logLevel: 'error',
outDir: 'dist/main',
unbundle: true,
deps: {
skipNodeModulesBundle: true,
},
plugins: [
lingui(),
babel({
plugins: [
'@lingui/babel-plugin-lingui-macro',
['@babel/plugin-syntax-decorators', { version: '2023-11' }],
],
}),
],
define: {
'process.env.ELECTRON_TELEMETRY_FEATURE': JSON.stringify(
process.env.ELECTRON_TELEMETRY_FEATURE ?? '',
),
'process.env.ELECTRON_TELEMETRY_API_KEY': JSON.stringify(
process.env.ELECTRON_TELEMETRY_API_KEY ?? '',
),
'process.env.ELECTRON_WEBPACK_APP_MOD_URL': JSON.stringify(
process.env.ELECTRON_WEBPACK_APP_MOD_URL ??
'https://www.nexusmods.com/skyrimspecialedition/mods/23852',
),
},
})