-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnuxt.config.js
91 lines (87 loc) · 2.87 KB
/
nuxt.config.js
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
require('dotenv').config()
export default {
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
'@nuxtjs/google-analytics'
],
modules: [
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
// https://go.nuxtjs.dev/content
'@nuxtjs/dotenv',
'@nuxtjs/amp',
'@nuxtjs/sitemap'
],
head: {
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Deployable and lightweight PHP MVC framework that suitable for small and medium web app' },
{ hid: 'robots1', name: 'robots', content: 'INDEX,FOLLOW'},
{ hid: 'fbid', property: 'fb:app_id', content: '918859565356038'},
{ hid: 'theme-color', property: 'theme-color', content: '#fb898f'},
{ hid: 'og:title', name: 'og:description', content: 'Seme Framework Documentation'},
{ hid: 'og:description', name: 'og:description', content: 'Deployable and lightweight PHP MVC framework that suitable for small and medium web app'},
{ hid: 'og:image', name: 'og:image', content: (process.env.CDN_URL || 'http://localhost:'+(process.env.PORT || '3001'))+'/fbshare.png'}
],
link: [
{ rel: 'stylesheet', href: 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' },
{ rel: 'icon', type: 'image/x-icon', href: (process.env.CDN_URL || 'http://localhost:'+(process.env.PORT || '3001'))+'/favicon.ico'},
{ rel: 'shortcut icon', type: 'image/x-icon', href: (process.env.CDN_URL || 'http://localhost:'+(process.env.PORT || '3001'))+'/favicon.ico'}
]
},
pwa: {
meta: {
ogImage: {
path: (process.env.CDN_URL || 'http://localhost:'+(process.env.PORT || '3001'))+'/icon.png',
width: '1480px',
height: '1038px',
type: 'image/png'
},
theme_color: '#fb898f'
}
},
css: [
],
plugins: [
{ src: '@/plugins/hl' },
{ src: '@/plugins/jsonld' }
],
ssr: true,
target: 'server',
server: {
port: process.env.PORT || 3001,
},
build: {
buildPath: process.env.CDN_URL || 'http://localhost:'+(process.env.PORT || '3001'),
analyze: false,
maxChunkSize: 300000,
extend(config, ctx) {
config.node = {
fs: 'empty'
},
config.module.rules.push({
test: /\.(ogg|mp3|wav|mpe?g)$/i,
loader: 'file-loader',
options: {
name: '[path][name].[ext]'
}
})
}
},
googleAnalytics: {
id: process.env.GOOGLE_ANALYTICS_ID,
autoTracking: {
screenview: true
}
},
amp: {
origin: process.env.BASE_URL || 'http://localhost:'+(process.env.PORT || '3001'),
mode: 'only', //could use `only` or `false` as well,
css: '~/css/app.amp.css'
},
sitemap: {
hostname: process.env.ORIGIN_URL || 'http://localhost:'+(process.env.PORT || '3001'),
gzip: false
},
components: true
}