您好,我正在 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 上我使用了这个:
// nuxt.config.js …Run Code Online (Sandbox Code Playgroud)