|
1 | | -export default { |
2 | | - /* |
3 | | - ** Nuxt rendering mode |
4 | | - ** See https://nuxtjs.org/api/configuration-mode |
5 | | - */ |
6 | | - mode: 'universal', |
7 | | - /* |
8 | | - ** Nuxt target |
9 | | - ** See https://nuxtjs.org/api/configuration-target |
10 | | - */ |
11 | | - target: 'server', |
12 | | - /* |
13 | | - ** Headers of the page |
14 | | - ** See https://nuxtjs.org/api/configuration-head |
15 | | - */ |
16 | | - head: { |
17 | | - title: process.env.npm_package_name || '', |
18 | | - meta: [ |
19 | | - { charset: 'utf-8' }, |
20 | | - { name: 'viewport', content: 'width=device-width, initial-scale=1' }, |
21 | | - { |
22 | | - hid: 'description', |
23 | | - name: 'description', |
24 | | - content: process.env.npm_package_description || '', |
25 | | - }, |
26 | | - ], |
27 | | - link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], |
| 1 | +import { defineNuxtConfig } from 'nuxt/config' |
| 2 | + |
| 3 | +export default defineNuxtConfig({ |
| 4 | + compatibilityDate: '2025-05-23', |
| 5 | + devServer: { |
| 6 | + host: '::1' |
28 | 7 | }, |
29 | | - /* |
30 | | - ** Global CSS |
31 | | - */ |
32 | | - css: [], |
33 | | - /* |
34 | | - ** Plugins to load before mounting the App |
35 | | - ** https://nuxtjs.org/guide/plugins |
36 | | - */ |
37 | | - plugins: ['~/plugins/vue-js-modal.js'], |
38 | | - /* |
39 | | - ** Auto import components |
40 | | - ** See https://nuxtjs.org/api/configuration-components |
41 | | - */ |
42 | | - components: true, |
43 | | - /* |
44 | | - ** Nuxt.js dev-modules |
45 | | - */ |
46 | | - buildModules: [ |
47 | | - // Doc: https://github.com/nuxt-community/eslint-module |
48 | | - '@nuxtjs/eslint-module', |
| 8 | + ssr: process.env.NUXT_RENDERING_MODE !== 'csr', |
| 9 | + plugins: [ |
| 10 | + process.env.NUXT_RENDERING_MODE === 'csr' |
| 11 | + ? '~/plugins-no-auto-import/vue-js-modal-csr.js' |
| 12 | + : '~/plugins-no-auto-import/vue-js-modal-ssr.js' |
49 | 13 | ], |
50 | | - /* |
51 | | - ** Nuxt.js modules |
52 | | - */ |
53 | | - modules: [], |
54 | | - /* |
55 | | - ** Build configuration |
56 | | - ** See https://nuxtjs.org/api/configuration-build/ |
57 | | - */ |
58 | | - build: {}, |
59 | | -} |
| 14 | + modules: ['@nuxt/eslint'] |
| 15 | +}) |
0 commit comments