1 Star 0 Fork 0

安静/nuxtjs-shop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nuxt.config.js 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
安静 提交于 2021-03-22 09:30 . first commit
export default {
server: {
port: 80,
host: '152.136.105.192'
},
head: {
title: 'nuxt-8',
htmlAttrs: {
lang: 'en'
},
meta: [{ charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: '' }],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
css: ['element-ui/lib/theme-chalk/index.css', 'assets/css/global.css', 'assets/css/transition.css'],
router: {
middleware: 'auth'
},
// 注入插件的顺序有前后需求,注意引用关系
plugins: [
{ src: '@/plugins/element-ui' },
{ src: '@/plugins/vue-global' },
{ src: '@/plugins/router' },
{ src: '@/plugins/axios' },
{ src: '@/plugins/request' },
{ src: '@/plugins/api' }
// { src: '@/plugins/echarts' }
],
// 定义系统默认loading效果,或者指定loading组件
// loading: { color: '#007fff', height: '50px' },
loading: '~/components/loading.vue',
modules: ['@nuxtjs/axios', 'cookie-universal-nuxt', '@nuxtjs/style-resources'],
axios: {
proxy: true // 开启axios跨域
// prefix:'/api', // baseUrl
},
proxy: {
// 开启跨域后的配置
'/api/': {
// target: 'http://152.136.105.192:3000', // 代理转发的地址
changeOrigin: true,
pathRewrite: {
// '^/api':'' // 替换 把'/api'替换为''
}
}
},
components: true,
buildModules: [],
styleResources: {
less: [],
scss: ['~/assets/scss/variable.scss']
},
build: {
transpile: [/^element-ui/]
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/TaiAi/nuxtjs-shop.git
[email protected]:TaiAi/nuxtjs-shop.git
TaiAi
nuxtjs-shop
nuxtjs-shop
master

搜索帮助