1 Star 0 Fork 0

Shinn/vue-ssr-blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nuxt.config.js 2.63 KB
一键复制 编辑 原始数据 按行查看 历史
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',
},
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/syanjun/vue-ssr-blog.git
git@gitee.com:syanjun/vue-ssr-blog.git
syanjun
vue-ssr-blog
vue-ssr-blog
master

搜索帮助