-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.js
129 lines (126 loc) · 3.15 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
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
// const environment = process.env.NODE_ENV || 'development'
require('dotenv').config()
const route = process.env.DEPLOY_ENV === 'GH_PAGES' ? '/pixelart-scaler/' : '/'
export default {
mode: 'universal',
router: {
base: route,
},
/*
** Headers of the page
*/
head: {
base: {
href: 'router.base',
},
title: 'ドット絵スケーラー',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || '',
},
{
hid: 'keywords',
name: 'keywords',
content: '画像,ドット絵,ピクセルアート,Pixelart,拡大,スケールアップ',
},
// color
{ name: 'theme-color', content: '#000' },
// twitter card
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary' },
{ hid: 'twitter:site', name: 'twitter:site', content: '@kitsunegadget' },
{ hid: 'twitter:creator', name: 'twitter:creator', content: '@yuy_az_' },
{ hid: 'og:url', property: 'og:url', content: 'https://kitsunegadget.github.io/' },
{ hid: 'og:title', property: 'og:title', content: 'ドット絵スケーラー -Pixelart Scaler-' },
{
hid: 'og:description',
property: 'og:description',
content: "Let's scaling your pixel-arts!",
},
{
hid: 'og:image',
property: 'og:image',
content: 'https://kitsunegadget.github.io/pixelart-scaler/card_min.png',
},
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: `${route}favicon.ico` },
{ rel: 'apple-touch-icon', type: 'image/png', href: `${route}icon128.png` },
],
script: [
//
],
},
/*
** Customize the progress-bar color
*/
loading: { color: '#60d3a3' },
/*
** Global CSS
*/
css: [],
/*
** Plugins to load before mounting the App
*/
plugins: [],
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxt/typescript-build',
'@nuxtjs/vuetify',
'@nuxtjs/dotenv',
'@nuxtjs/google-analytics',
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://bootstrap-vue.js.org
// 'bootstrap-vue/nuxt',
// Doc: https://axios.nuxtjs.org/usage
// '@nuxtjs/axios',
'@nuxtjs/style-resources',
],
styleResources: {
scss: ['@/assets/variables.scss'],
},
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {},
googleAnalytics: {
// debug: {
// enabled: true,
// sendHitTask: true,
// },
id: process.env.GOOGLE_ANALYTICS_ID, // your analytics ID
},
/*
** Build configuration
*/
build: {
analayze: true,
extend(config, { isDev, isClient }) {
config.module.rules.push({
test: /\.worker\.ts$/,
use: {
loader: 'worker-loader',
},
exclude: /(node_modules)/,
})
config.output.globalObject = 'this'
// avoid dotenv error
config.node = {
fs: 'empty',
}
if (isDev || isClient) {
// config.devtool = 'source-map'
}
},
},
}