Files
site-10584/nuxt.config.ts
2026-01-29 10:43:43 +08:00

96 lines
2.8 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 配置文件
* 一般只需要修噶appId即可使用
* 如果涉及到独立后端API的二次开发可以修改apiBaseUrl
* @author Websoft Inc.
*/
// 填租户ID
const appId = 10538;
// 接口地址
let apiBaseUrl = 'https://cms-api.websoft.top/api'
// 应用名称
const appName = '广西粮食协会';
// ------------------------------- Config by Websoft Inc. ---------------------------- //
const isDev = process.env.NODE_ENV === 'development'
if(isDev){
// apiBaseUrl = 'http://127.0.0.1:9000/api'
}
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: {enabled: false},
modules: [
'@element-plus/nuxt',
'@unocss/nuxt',
'@nuxt/image',
'@nuxtjs/i18n',
// '@pinia/nuxt',
// '@pinia-plugin-persistedstate/nuxt',
],
// build: {
// transpile: ['pinia-plugin-persistedstate']
// },
css: [
'element-plus/dist/index.css',
'element-plus/theme-chalk/display.css'
],
ssr: false,
plugins: [
'@/plugins/element-ui'
],
i18n: {
strategy: 'prefix_and_default', // 添加路由前缀的方式 prefix_and_default
locales: ["zh","en"], //配置语种
defaultLocale: 'zh', // 默认语种
vueI18n: './i18n.config.ts', // 通过vueI18n配置
},
app: {
head: {
title: appName,
meta: [
{ name: 'keywords', content: '企业官网,建站系统,websoftCMS,网站源码,java,nuxt,antd,vue3' },
{
name: 'description',
content: 'weSite企业建站系统助力企业信息化建设和转型主要产品有企业官网电商系统微信公众号微信小程序应用等使用目前最流行的技术栈打造。https://websoft.top'
},
{ name: 'apple-mobile-web-app-capable', content: 'yes'},
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black'},
{ charset: 'utf-8' }
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
script: [
{ innerHTML: 'var备案号 = "备案号桂ICP备13005851";', type: 'text/javascript' }
]
}
},
$production: {
devServer: {
port: appId
}
},
$development: {
devServer: {
port: appId
}
},
runtimeConfig: {
// 客户端获取使用
public: {
apiBaseUrl,
tenantId: appId,
siteName: appName,
domain: 'websoft.top',
// 核心接口
apiServer: 'https://server.gxwebsoft.com/api',
appSecret: '',
appName: '你的网站名称'
}
}
})