-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathnuxt.config.ts
166 lines (152 loc) · 4.11 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
import { setNuxtConfig, getNuxtConfig } from '@opendreamnet/nuxtjs-base'
import { isNil } from 'lodash'
import pkg from './package.json'
// Base env
process.env.npm_package_name = pkg.name
process.env.npm_package_displayName = pkg.displayName
process.env.npm_package_description = pkg.description
process.env.npm_package_version = pkg.version
export default setNuxtConfig({
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
script: [
{
// The latest IPFS-JS libraries are now ESM forcing us to use the
// @opendreamnet/ipfs version built with Webpack 5.
// (NuxtJS v2 uses Webpack 4)
// We still include the library to use the types.
src: 'https://unpkg.com/@opendreamnet/[email protected]/dist/index.umd.js'
}
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
...getNuxtConfig().css!,
'tippy.js/dist/tippy.css',
'mooviejs/css/moovie.css',
'highlight.js/styles/default.css',
'highlight.js/styles/atom-one-dark.css'
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
...getNuxtConfig().plugins!,
'~/plugins/boot.ts',
'~/plugins/ipfs.ts',
'~/plugins/vue-modal.ts'
],
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/typescript
'@nuxt/typescript-build',
// https://go.nuxtjs.dev/tailwindcss
'@nuxtjs/tailwindcss',
// https://github.com/nuxt-community/style-resources-module
'@nuxtjs/style-resources',
// https://github.com/nuxt-community/fontawesome-module
'@nuxtjs/fontawesome',
// https://github.com/nuxt-community/markdownit-module
'@nuxtjs/markdownit',
// https://typed-vuex.roe.dev/
'nuxt-typed-vuex'
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
// https://go.nuxtjs.dev/content
'@nuxt/content'
],
generate: {
routes: ['/docs/contact', '/docs/license', '/docs/privacy', '/docs/tos']
},
// https://github.com/nuxt-community/fontawesome-module
fontawesome: {
icons: {
solid: [
'faDownload',
'faUpload',
'faExternalLinkSquareAlt',
'faQuestion',
'faQuestionCircle',
'faShare',
'faClone',
'faFolderOpen',
'faBook',
'faDirections',
'faSave',
'faExclamationTriangle',
'faUsers',
'faComments',
'faCog',
'faSpinner',
'faFileVideo',
'faFileAudio',
'faFileImage',
'faFileAlt',
'faFilePdf',
'faFolder',
'faTrashAlt',
'faStar',
'faHeart',
'faHeartBroken',
'faDatabase',
'faCaretDown',
'faThumbtack',
// 'faFileMusic',
'faFileArchive',
'faFileCode',
'faFileExcel',
'faFilePowerpoint',
'faFileWord',
'faFileCsv'
]
}
},
pwa: {
workbox: {
enabled: false
}
},
publicRuntimeConfig: {
build: {
opendreamnet: !isNil(process.env.OPENDREAMNET)
},
app: {
url: process.env.APP_URL,
urlCid: process.env.APP_URL_CID || process.env.APP_URL,
githubUrl: process.env.APP_GITHUB_URL
},
company: {
name: process.env.COMPANY_NAME || 'OpenDreamnet',
logo: process.env.COMPANY_LOGO,
url: process.env.COMPANY_URL || 'mailto:[email protected]'
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
extend(config, { isClient }) {
if (isClient) {
config.devtool = 'source-map'
}
},
// Customize Babel configuration for JavaScript and Vue files.
babel: {
presets({ isServer }) {
return [
[
'@nuxt/babel-preset-app',
{
targets: isServer ? 'current node' : {},
corejs: { version: 3 }
}
]
]
},
plugins: [
'lodash',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining'
]
}
}
})