You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
3.2 KiB
121 lines
3.2 KiB
2 months ago
|
/* eslint-disable nuxt/no-cjs-in-config */
|
||
|
|
||
|
module.exports = {
|
||
|
srcDir: './src',
|
||
|
loading: false,
|
||
|
// Global page headers: https://go.nuxtjs.dev/config-head
|
||
|
head: {
|
||
|
title: '糖尿病网 - 服务糖尿病患者的知识社区',
|
||
|
htmlAttrs: {
|
||
|
lang: 'en'
|
||
|
},
|
||
|
meta: [
|
||
|
{ charset: 'utf-8' },
|
||
|
{
|
||
|
name: 'viewport',
|
||
|
content:
|
||
|
'initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,width=device-width,user-scalable=no,viewport-fit=cover'
|
||
|
},
|
||
|
{
|
||
|
hid: 'description',
|
||
|
name: 'description',
|
||
|
content:
|
||
|
'糖尿病网,服务糖尿病患者的知识平台!以帮助糖尿病患者科学管理身体为目标,提供最新鲜、专业的健康管理资讯。'
|
||
|
},
|
||
|
{
|
||
|
hid: 'keywords',
|
||
|
name: 'keywords',
|
||
|
content:
|
||
|
'糖尿病,健康管理,控糖,血糖,血糖管理,科普,知识社区,专业资讯,干货,糖友,疾病,公益,有用,深度,饮食知识'
|
||
|
},
|
||
|
{ name: 'format-detection', content: 'telephone=no' }
|
||
|
],
|
||
|
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
|
||
|
script: [
|
||
|
{
|
||
|
src: 'https://hm.baidu.com/hm.js?c17780012e32ae356918a39fe159755e'
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
router: {
|
||
|
middleware: ['device']
|
||
|
},
|
||
|
// Global CSS: https://go.nuxtjs.dev/config-css
|
||
|
css: [
|
||
|
'element-ui/lib/theme-chalk/index.css',
|
||
|
'video.js/dist/video-js.css',
|
||
|
'vue-video-player/src/custom-theme.css'
|
||
|
],
|
||
|
|
||
|
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
||
|
plugins: [
|
||
|
'@/plugins/element-ui',
|
||
|
'@/plugins/axios',
|
||
|
'@/plugins/filters',
|
||
|
{ src: '@/plugins/vueqr', ssr: true },
|
||
|
{ src: '@/plugins/video', ssr: false },
|
||
|
{ src: '~/plugins/swiper.js', ssr: false },
|
||
|
{ src: '~/plugins/wx-share.js', ssr: false },
|
||
|
{ src: '~/plugins/baidu.js', ssr: false }
|
||
|
],
|
||
|
|
||
|
// Auto import components: https://go.nuxtjs.dev/config-components
|
||
|
components: true,
|
||
|
|
||
|
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
|
||
|
buildModules:
|
||
|
process.env.NODE_ENV !== 'production' ? ['@nuxtjs/eslint-module'] : [],
|
||
|
styleResources: {
|
||
|
scss: ['~/assets/css/common.scss']
|
||
|
},
|
||
|
// Modules: https://go.nuxtjs.dev/config-modules
|
||
|
modules: ['@nuxtjs/axios', '@nuxtjs/style-resources', '@nuxtjs/robots'],
|
||
|
axios: {
|
||
|
prefix: '/web',
|
||
|
credentials: true,
|
||
|
proxy: process.env.NODE_ENV !== 'production',
|
||
|
timeout: 2000,
|
||
|
debug: false
|
||
|
},
|
||
|
proxy: {
|
||
|
'/web/': process.env.PROXY_URL
|
||
|
},
|
||
|
|
||
|
robots: {
|
||
|
UserAgent: '*',
|
||
|
Disallow: '/user'
|
||
|
},
|
||
|
|
||
|
publicRuntimeConfig: {
|
||
|
axios: {
|
||
|
browserBaseURL:
|
||
|
process.env.NODE_ENV !== 'production'
|
||
|
? null
|
||
|
: process.env.BROWSER_BASE_URL + '/web'
|
||
|
}
|
||
|
},
|
||
|
|
||
|
privateRuntimeConfig: {
|
||
|
axios: {
|
||
|
baseURL:
|
||
|
process.env.NODE_ENV !== 'production'
|
||
|
? null
|
||
|
: process.env.PROXY_URL + '/web'
|
||
|
}
|
||
|
},
|
||
|
|
||
|
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||
|
build: {
|
||
|
transpile: [/^element-ui/]
|
||
|
},
|
||
|
server: {
|
||
|
port: process.env.PORT || 3000, // default: 3000
|
||
|
// host: '0.0.0.0' // default: localhost
|
||
|
host: 'localhost'
|
||
|
},
|
||
|
telemetry: false,
|
||
|
env: {
|
||
|
VUE_APP_TITLE: process.env.VUE_APP_TITLE
|
||
|
}
|
||
|
};
|