1 Star 0 Fork 1

swantbo / vue_nuxt-mtapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nuxt.config.js 1.96 KB
一键复制 编辑 原始数据 按行查看 历史
再次重逢的时间 提交于 2019-07-03 17:33 . add shop server and page
module.exports = {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
'element-ui/lib/theme-chalk/reset.css',
'element-ui/lib/theme-chalk/index.css',
'element-ui/lib/theme-chalk/display.css',
'@/assets/css/main.css'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/element-ui'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/eslint-module'
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
proxy: true
// See https://github.com/nuxt-community/axios-module#options
},
proxy: {
'/users/': { target: 'http://127.0.0.1:3000' },
'/shop/': { target: 'http://127.0.0.1:3000' },
'/order/': { target: 'http://127.0.0.1:3000' },
'/search/': { target: 'http://127.0.0.1:3000' },
'/category/': { target: 'http://127.0.0.1:3000' },
'/cart/': { target: 'http://127.0.0.1:3000' },
'/geo/': { target: 'http://127.0.0.1:3000' }
},
/*
** Build configuration
*/
build: {
transpile: [/^element-ui/],
/*
** You can extend webpack config here
*/
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
},
cache: false
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/swantbo/vue_nuxt-mtapp.git
git@gitee.com:swantbo/vue_nuxt-mtapp.git
swantbo
vue_nuxt-mtapp
vue_nuxt-mtapp
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891