代码拉取完成,页面将自动刷新
const { WEB_URL } = require('./config')
const publicPath = '/static1/'
export default {
mode: 'spa',
server: {
port: 3000, // default: 3000
host: '0.0.0.0' // default: localhost
},
/*
** 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, minimum-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: ['@/assets/css/index.css', '@/assets/font/iconfont.css', '@/assets/css/mintui.css'],
/*
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/i18n.client',
'~/plugins/axios.client',
'@/plugins/socket.client',
'@/plugins/mintui.client',
'@/plugins/filters',
'@/plugins/directives'
],
/*
** Nuxt.js dev-modules
*/
buildModules: [],
/*
** Nuxt.js modules
*/
modules: ['@nuxtjs/axios', '@nuxtjs/toast'],
axios: {
baseURL: `${WEB_URL}api`,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
},
toast: {
duration: 3000,
singleton: true,
position: 'top-center'
},
router: {
mode: 'hash'
},
/*
** Build configuration
*/
build: {
publicPath,
babel: {
plugins: [['component', { libraryName: 'mint-ui', style: true }]]
},
/*
** You can extend webpack config here
*/
extend (config, ctx) {
const { isDev } = ctx
if (!isDev) {
config.output.publicPath = `.${publicPath}`
}
return config
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。