-
Notifications
You must be signed in to change notification settings - Fork 3
/
nuxt.config.ts
84 lines (82 loc) · 2.05 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
import svgLoader from 'vite-svg-loader';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
ssr: false,
css: ["~/assets/styles/global.scss"],
dir: {
public: 'static',
},
modules: ['@nuxtjs/google-fonts', '@vueuse/nuxt', '@nuxtjs/color-mode'],
googleFonts: {
preload: true,
families: {
Outfit: [300, 400, 700],
'Space Grotesk': [400]
},
},
runtimeConfig: {
public: {
rpcUrl: process.env.RPC_URL,
apiBase: process.env.API_BASE,
oldApiBase: process.env.OLD_API_BASE || 'https://backend.k8s.prd.nos.ci',
network: process.env.NETWORK || 'mainnet',
}
},
vite: {
esbuild: {
target: "esnext",
},
plugins: [
svgLoader({
defaultImport: 'url',
}),
nodePolyfills({
// To exclude specific polyfills, add them to this list.
exclude: [
'fs', // Excludes the polyfill for `fs` and `node:fs`.
],
// Whether to polyfill specific globals.
globals: {
Buffer: true, // can also be 'build', 'dev', or false
global: true,
process: true,
},
// Whether to polyfill `node:` protocol imports.
protocolImports: true,
}),
],
resolve: {
alias: {
stream: 'rollup-plugin-node-polyfills/polyfills/stream',
events: 'rollup-plugin-node-polyfills/polyfills/events',
},
},
build: {
target: "esnext"
},
optimizeDeps: {
include: ["@solana/web3.js", "buffer"],
esbuildOptions: {
target: "esnext",
define: {
global: 'globalThis',
},
},
},
define: {
"process.env.BROWSER": true,
},
css: {
preprocessorOptions: {
scss: {
sourceMap: false,
additionalData: '@import "@/assets/styles/variables.scss";',
silenceDeprecations: ['mixed-decls', 'slash-div']
},
},
},
},
components: true,
})