-
Notifications
You must be signed in to change notification settings - Fork 10
/
nuxt.config.ts
145 lines (142 loc) · 3.59 KB
/
nuxt.config.ts
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// import fs from 'fs'
// import { fileURLToPath } from 'node:url'
// import GlobalPolyFill from '@esbuild-plugins/node-globals-polyfill'
const appTitle = 'MΞRKLIN'
const appDescription = 'Open-source web-only EVM wallet explorer made with Vue, Nuxt, and Ethers'
const appUrl = 'https://app.merklin.xyz'
export default defineNuxtConfig({
ssr: false,
runtimeConfig: {
public: {
etherscanApiKey: process.env.ETHERSCAN_API_KEY,
infuraApiKey: process.env.INFURA_API_KEY,
alchemyApiKey: process.env.ALCHEMY_API_KEY,
pocketApiKey: process.env.POCKET_API_KEY,
ankrApiKey: process.env.ANKR_API_KEY,
jsonRpcUrl: process.env.ETH_RPC_URL || 'https://eth-mainnet.g.alchemy.com/v2/n5Vj8wE2BHWCtpxqeIZZRJFMVyvifuYv',
repoUrl: 'https://github.com/toniengelhardt/merklin',
feedbackEmail: '[email protected]',
twitterUrl: '',
discordUrl: '',
},
},
modules: [
'@kevinmarrec/nuxt-pwa',
'@nuxtjs/color-mode',
'@nuxtjs/plausible',
'@pinia/nuxt',
'@pinia-plugin-persistedstate/nuxt',
'@unocss/nuxt',
'@vueuse/nuxt',
'nuxt-headlessui',
'nuxt-icon',
// 'nuxt-og-image',
// 'nuxt-security',
],
imports: {
dirs: [
'./stores',
],
},
devServer: {
host: process.env.HOST || 'localhost',
port: process.env.PORT ? +process.env.PORT : 3000,
// https: {
// key: fs.readFileSync(fileURLToPath(new URL('./localhost-key.pem', import.meta.url))),
// cert: fs.readFileSync(fileURLToPath(new URL('./localhost.pem', import.meta.url))),
// },
},
nitro: {
prerender: {
crawlLinks: true,
routes: [
'/',
],
},
},
// vite: {
// resolve: {
// alias: {
// process: 'process/browser',
// stream: 'stream-browserify',
// zlib: 'browserify-zlib',
// util: 'util',
// },
// },
// optimizeDeps: {
// esbuildOptions: {
// define: {
// global: 'globalThis',
// },
// plugins: [
// GlobalPolyFill({
// process: true,
// buffer: true,
// }) as any, // fix weird type error
// ],
// },
// },
// },
typescript: {
shim: false,
},
css: [
'assets/css/style.css',
],
app: {
head: {
viewport: 'viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no',
htmlAttrs: {
lang: 'en',
translate: 'no',
},
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico', key: 'favicon' },
],
},
},
pwa: {
manifest: {
id: '/?standalone=true',
name: appTitle,
short_name: appTitle,
description: appDescription,
display: 'standalone',
orientation: 'portrait',
lang: 'en',
start_url: '/?standalone=true',
scope: '/',
categories: ['utilities'],
theme_color: '#18181b',
background_color: '#18181b',
},
meta: {
name: appTitle,
description: appDescription,
mobileApp: true,
mobileAppIOS: true,
lang: 'en',
favicon: false,
ogType: 'website',
ogSiteName: appTitle,
ogTitle: appTitle,
ogDescription: appDescription,
ogUrl: appUrl,
theme_color: false,
},
icon: {
source: 'public/icon.png',
maskableSource: 'public/icon.maskable.png',
maskablePadding: 0,
},
},
// ogImage: {
// host: process.env.SITE_URL || 'https://app.merklin.xyz',
// },
colorMode: {
classSuffix: '',
},
plausible: {
domain: process.env.PLAUSIBLE_DOMAIN || '',
},
})