-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
77 lines (69 loc) · 1.77 KB
/
nuxt.config.ts
File metadata and controls
77 lines (69 loc) · 1.77 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import pkg from './package.json';
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
modules: [
'@pinia/nuxt',
'@nuxtjs/tailwindcss',
'@nuxt/icon',
'nuxt-auth-utils',
],
typescript: {
strict: true,
typeCheck: false, // Set to true in CI with vue-tsc installed
},
tailwindcss: {
cssPath: '~/assets/css/main.css',
configPath: 'tailwind.config.ts',
},
runtimeConfig: {
databaseUrl: (() => {
const baseUrl =
process.env.DATABASE_URL ||
'postgres://tracker:tracker@localhost:5432/trackarr';
// Force SSL in production
if (
process.env.NODE_ENV === 'production' &&
!baseUrl.includes('sslmode=')
) {
return (
baseUrl + (baseUrl.includes('?') ? '&' : '?') + 'sslmode=require'
);
}
return baseUrl;
})(),
redisUrl: process.env.REDIS_URL || 'redis://localhost:6379',
public: {
appVersion: pkg.version,
trackerHttpUrl:
process.env.TRACKER_HTTP_URL || 'http://localhost:8080/announce',
trackerUdpUrl:
process.env.TRACKER_UDP_URL || 'udp://localhost:8081/announce',
trackerWsUrl: process.env.TRACKER_WS_URL || 'ws://localhost:8082',
},
},
// Exclude native modules from Nitro bundling
nitro: {
externals: {
inline: [],
external: [
'node-datachannel',
'webrtc-polyfill',
'@thaunknown/simple-peer',
'webtorrent',
],
},
},
app: {
head: {
title: 'Trackarr',
meta: [
{ name: 'description', content: 'High-performance BitTorrent tracker' },
],
},
},
build: {
transpile: ['chart.js', 'vue-chartjs'],
},
});