代码拉取完成,页面将自动刷新
export default {
srcDir: 'src/',
/*
** Nuxt rendering mode
** See https://nuxtjs.org/api/configuration-mode
*/
mode: 'universal',
/*
** Nuxt target
** See https://nuxtjs.org/api/configuration-target
*/
target: 'server',
/*
** Headers of the page
** See https://nuxtjs.org/api/configuration-head
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
loading: {
color: '#39a275'
},
/*
** Global CSS
*/
css: [
'ant-design-vue/dist/antd.less'
],
/*
** Plugins to load before mounting the App
** https://nuxtjs.org/guide/plugins
*/
plugins: [
'@/plugins/antd-ui',
"@/plugins/router",
"@/plugins/axios",
{
src: "@/plugins/clipboardData",
ssr: false,
},
{
src: '@/plugins/vue-mavon-editor',
ssr: false,
},
{
src: "@/plugins/filters",
ssr: true,
},
{
src: "@/plugins/vue-infinite-scroll",
ssr: false,
},
{
src: "@/plugins/directives",
ssr: true,
},
],
/*
** Auto import components
** See https://nuxtjs.org/api/configuration-components
*/
components: true,
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxt/typescript-build',
],
/*
** Nuxt.js modules
*/
modules: [
'@nuxtjs/axios'
],
axios: {
proxy: true,
prefix: '/api/v1', // baseURL
credentials: true, // 证书
},
proxy: {
'/api': {
target: 'http://localhost:3000', // 代理地址
changeOrigin: true,
},
},
/*
** Build configuration
** See https://nuxtjs.org/api/configuration-build/
*/
build: {
loaders: {
less: {
lessOptions: {
javascriptEnabled: true,
modifyVars: {
'primary-color': '#39a275',
// 'layout-body-background': '#fff'
},
},
},
},
extractCSS: true,
// optimization: {
// splitChunks: {
// cacheGroups: {
// styles: {
// name: 'styles',
// test: /\.(css|vue)$/,
// chunks: 'all',
// enforce: true
// }
// }
// }
// }
},
router: {
scrollBehavior: function (to, from, savedPosition) {
return { x: 0, y: 0 };
},
},
server: {
port: 4100,
host: 'localhost',
},
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。