-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathnuxt.config.js
66 lines (64 loc) · 2.64 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
const webTitle = "Nuxt Web Template Example"
module.exports = {
head: {
htmlAttrs: {
lang: 'en'
},
title: webTitle,
titleTemplate: `%s | ${webTitle}`,
meta: [
{ charset: 'utf-8' },
{ name:"google-site-verification", content:"YOUR_GOOGLE_SITE_VERIFICATION_HERE" },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
//manifest theme
{ name: 'apple-mobile-web-app-title', content: webTitle },
{ name: 'application-name', content: webTitle },
{ name: 'msapplication-TileColor', content: '#fe6601' },
{ name: 'msapplication-TileImage', content: '/mstile-144x144.png' },
{ name: 'theme-color', content: '#fe6601' },
//robots
{ name: "robots", content: "noodp,noydir" },
//social media
{ property: 'og:site_name', content: webTitle },
{ property: 'og:type', content: 'website' },
{ property: 'og:locale', content: 'en_US' },
{ name: 'twitter:card', content: 'summary' },
{ name: 'twitter:site', content: '@janumedia' },
{ name: 'twitter:creator', content: '@janumedia' }
],
link: [
{ rel: 'apple-touch-icon', type: 'image/x-icon', size: "180x180", href: '/apple-touch-icon.png' },
{ rel: 'icon', type: 'image/x-icon', size: "32x32", href: '/favicon-32x32.png' },
{ rel: 'icon', type: 'image/x-icon', size: "16x16", href: '/favicon-16x16.png' },
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: "preload", href:"https://fonts.googleapis.com/css?family=Catamaran", as:"style"},
{ rel: "stylesheet", href:"https://fonts.googleapis.com/css?family=Catamaran", bottom: true},
{ rel: "preconnect", href:"https://fonts.gstatic.com/", crossorigin:"crossorigin"},
],
//disable sanitize to quote https://github.com/nuxt/nuxt.js/issues/2230#issuecomment-346997270
__dangerouslyDisableSanitizers: ['script']
},
loading: {
color: '#FE6601',
height: '4px'
},
css: [
"@/assets/css/style.scss"
],
build: {
//extract css
extractCSS: true,
//generate js filenames without chunkhash
filenames: {
css: '[name].css',
manifest: 'manifest.js',
vendor: 'common.js',
app: 'app.js',
chunk: '[name].js'
},
},
env: {
//fixed axios ECONNREFUSED for static local json
baseUrl: process.env.BASE_URL || 'http://localhost:3000'
}
}