-
Notifications
You must be signed in to change notification settings - Fork 2
/
nuxt.config.ts
64 lines (59 loc) · 3.45 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
import browserslist from 'browserslist'
const browserslistConfig = browserslist.loadConfig({ path: '.' })
import legacy from '@vitejs/plugin-legacy'
export default defineNuxtConfig({
// Global page headers: https://go.nuxtjs.dev/config-head
app: {
head: {
title: 'chiblog',
htmlAttrs: {
lang: 'zh-cn'
//@ts-ignore
// theme: 'dark-mode'
},
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content:
'width=device-width, initial-scale=1, minium-scale=1, maxium-scale=1, user-scalable=no'
},
{ name: 'format-detection', content: 'telephone=no' }
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
// if you do not want to import busuanzi, please note it!
// the second fixed the problem of next-page no change.
script: [
// {
// src: '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js',
// async: true
// },
// {
// textContent: 'window.onpopstate = function () { var bszCaller,bszTag;!function(){var c,d,e,a=!1,b=[];ready=function(c){return a||"interactive"===document.readyState||"complete"===document.readyState?c.call(document):b.push(function(){return c.call(this)}),this},d=function(){for(var a=0,c=b.length;c>a;a++)b[a].apply(document);b=[]},e=function(){a||(a=!0,d.call(window),document.removeEventListener?document.removeEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.detachEvent("onreadystatechange",e),window==window.top&&(clearInterval(c),c=null)))},document.addEventListener?document.addEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){/loaded|complete/.test(document.readyState)&&e()}),window==window.top&&(c=setInterval(function(){try{a||document.documentElement.doScroll("left")}catch(b){return}e()},5)))}(),bszCaller={fetch:function(a,b){var c="BusuanziCallback_"+Math.floor(1099511627776*Math.random());window[c]=this.evalCall(b),a=a.replace("=BusuanziCallback","="+c),scriptTag=document.createElement("SCRIPT"),scriptTag.type="text/javascript",scriptTag.defer=!0,scriptTag.src=a,scriptTag.referrerPolicy="no-referrer-when-downgrade",document.getElementsByTagName("HEAD")[0].appendChild(scriptTag)},evalCall:function(a){return function(b){ready(function(){try{a(b),scriptTag.parentElement.removeChild(scriptTag)}catch(c){bszTag.hides()}})}}},bszCaller.fetch("//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback",function(a){bszTag.texts(a),bszTag.shows()}),bszTag={bszs:["site_pv","page_pv","site_uv"],texts:function(a){this.bszs.map(function(b){var c=document.getElementById("busuanzi_value_"+b);c&&(c.innerHTML=a[b])})},hides:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="none")})},shows:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="inline")})}}; }'
// }
]
}
},
// modules: ['@pinia/nuxt'],
plugins: [{ src: '@/plugins/loadValine.client.ts', mode: 'client' }],
runtimeConfig: {
chiblogConfigType: '',
chiblogConfigUrl: '',
chiblogIgnoreBetaTip: false,
chiblogAiApiKey: ''
},
vite: {
plugins: [
legacy({
targets: browserslistConfig
})
]
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
modules: ["@nuxtjs/tailwindcss"]
})