12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- // import generateRoutes from './generate'
- // const list = [
- // { id: 113, type: 'ldm' },
- // { id: 102, type: 'app' },
- // { id: 62, type: 'app' },
- // ]
- // const routes = generateRoutes(list, '_template')
- // 运行环境
- const envConfig = require('dotenv').config({
- path: `.env${process.env.ENV ? `.${process.env.ENV}` : ''}`,
- })
- export default {
- // generate: {
- // routes: routes,
- // },
- // Global page headers: https://go.nuxtjs.dev/config-head
- head: {
- title: '认证通',
- htmlAttrs: {
- lang: 'zh-cn',
- },
- meta: [
- { charset: 'utf-8' },
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
- { name: 'description', content: '认证通|一款专业的正品认证SaaS软件系统' },
- { name: 'format-detection', content: 'telephone=no' },
- ],
- // link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
- },
- // Global CSS: https://go.nuxtjs.dev/config-css
- css: ['vant/lib/index.css', 'swiper/css/swiper.css'],
- // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
- plugins: ['@/plugins/vant', '@/plugins/axios', '@/plugins/vue-filters'],
- // Auto import components: https://go.nuxtjs.dev/config-components
- components: true,
- // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
- buildModules: [
- // https://go.nuxtjs.dev/tailwindcss
- '@nuxtjs/tailwindcss',
- ],
- // Modules: https://go.nuxtjs.dev/config-modules
- modules: [
- // https://go.nuxtjs.dev/axios
- '@nuxtjs/axios',
- ],
- // Axios module configuration: https://go.nuxtjs.dev/config-axios
- axios: {
- // Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
- baseURL: envConfig.parsed.BASE_URL,
- },
- // Build Configuration: https://go.nuxtjs.dev/config-build
- build: {
- extractCSS: true,
- filenames: {
- chunk: ({ isDev }) => (isDev ? '[name].js' : '[id].[contenthash].js'),
- },
- },
- // 配置 Nuxt.js 应用是开发模式还是生产模式
- dev: process.env.NODE_ENV !== 'production',
- // 配置在客户端和服务端共享的环境变量
- env: {
- ...process.env,
- ...envConfig.parsed,
- },
- server: {
- port: process.env.PORT,
- host: process.env.HOST,
- },
- }
|