nuxt

本文介绍了如何使用Nuxt.js配置全局头部、CSS、插件、代理、组件和模块,以实现高效的前端开发和API集成。重点讲解了构建一个具备国际化、元标签优化和Ant Design Vue框架集成的现代应用。
摘要由CSDN通过智能技术生成

export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: ‘nuxt-app’,
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’ }
]
},

// Global CSS: https://go.nuxtjs.dev/config-css
css: [
‘ant-design-vue/dist/antd.css’
],

// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
‘@/plugins/antd-ui’,’@/plugins/components_dabao’,’@/plugins/axios’
],
proxy: {
‘/api’: {
target: ‘http://localhost:3001’, // 目标接口域名
pathRewrite: {
‘^/api’: ‘/’, // 把 /api 替换成 /
}
}
},

// Auto import components: https://go.nuxtjs.dev/config-components
components: true,

// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
],

// Modules: https://go.nuxtjs.dev/config-modules
modules: [
‘@nuxtjs/axios’,’@nuxtjs/proxy’
],

// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值