-
Notifications
You must be signed in to change notification settings - Fork 4
/
nuxt.config.mts
86 lines (76 loc) · 1.46 KB
/
nuxt.config.mts
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
import codegen from "vite-plugin-graphql-codegen";
import { watch } from "vite-plugin-watch";
export default defineNuxtConfig({
ssr: false,
app: {
pageTransition: { name: "fade", mode: "out-in" },
head: {
htmlAttrs: {
lang: "en",
},
title: "Bitcoin Cash Explorer",
link: [
{
rel: "icon",
sizes: "32x32",
href: "/bch.svg",
},
{
rel: "stylesheet",
href: "/font/uicon.css",
},
],
},
},
css: ["~/assets/theme.scss"],
srcDir: "src",
pages: true,
components: true,
modules: ["@nuxtjs/apollo", "@nuxtjs/i18n", "@pinia/nuxt"],
i18n: {
// add `vueI18n` option to `@nuxtjs/i18n` module options
langDir: "locales/",
locales: [{ code: "en", language: "english", file: "en.js", dir: "ltr" }],
defaultLocale: "en",
},
apollo: {
clients: {
default: {
httpEndpoint: process.env.CHAINGRAPH_HTTP || "",
wsEndpoint: process.env.CHAINGRAPH_WS || "",
},
},
},
build: {
transpile: ["@nuxtjs/apollo"],
},
vue: {
compilerOptions: {
isCustomElement: (tag) => tag === "qr-code",
},
},
vite: {
build: {
target: "esnext",
},
optimizeDeps: {
esbuildOptions: {
define: { global: "globalThis" },
target: "esnext",
plugins: [],
},
},
plugins: [
codegen(),
watch({
pattern: "src/assets/icons/**/*.svg",
command: "node ./script/iconGenerate.mjs",
onInit: true,
}),
],
},
typescript: {
strict: true,
},
compatibilityDate: "2024-09-13",
});