小编Luc*_*cas的帖子

如何在 Nuxt 3 上部署并生成静态站点

您好,我正在 Nuxt 上创建网站,并且我已经在 Nuxt 3 上创建了一个新应用程序。但是我在部署方面遇到了问题,“正常服务器”没有像 Nuxt 2.x 那样的“正常”构建。

我正在使用“Lamdba”预设。 https://v3.nuxtjs.org/docs/deployment/presets/lambda

// nuxt.config.ts

import { defineNuxtConfig } from 'nuxt3'

// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
export default defineNuxtConfig({
  // Global page headers: https://go.nuxtjs.dev/config-head

  nitro: {
    preset: 'lambda'
  },

  head: {
    title: 'Title',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' }
 
      
    ],
    link: [
      { rel: 'icon', type: 'image/png', href: '/favicon.png' }
    ],
  script: [
    {  
      type: 'text/javascript', 
      src: '/mana.js',
  }
]
},
})
Run Code Online (Sandbox Code Playgroud)

在 Nuxt 2.x 上我使用了这个:

deployment nuxt.js nuxtjs3

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

deployment ×1

nuxt.js ×1

nuxtjs3 ×1