chore: update Node.js version and optimize build configuration

This commit is contained in:
ccbikai 2025-05-21 12:15:04 +08:00
parent 5fae865fbe
commit efbd6c7994
4 changed files with 16 additions and 7 deletions

View file

@ -1 +1 @@
20.11.0
22.15.1

View file

@ -1,4 +1,4 @@
import { provider, runtime } from 'std-env'
import { provider } from 'std-env'
import { currentLocales } from './i18n/i18n'
// https://nuxt.com/docs/api/configuration/nuxt-config
@ -97,7 +97,7 @@ export default defineNuxtConfig({
cache: false,
database: false,
kv: true,
workers: (provider === 'cloudflare_workers' || runtime === 'node') && provider !== 'cloudflare_pages',
workers: provider !== 'cloudflare_pages',
},
eslint: {

View file

@ -9,7 +9,7 @@
},
"scripts": {
"dev": "nuxt dev",
"build": "nuxt build",
"build": "NODE_OPTIONS=--max-old-space-size=8192 nuxt build",
"build:map": "node scripts/build-map.js",
"build:colo": "node scripts/build-colo.js",
"preview": "wrangler pages dev dist",

View file

@ -2,13 +2,22 @@ name = "sink"
main = "dist/server/index.mjs"
compatibility_date = "2025-05-08"
compatibility_flags = [ "nodejs_compat" ]
keep_vars = true
[dev]
port = 3000
[assets]
directory = "dist/public"
binding = "ASSETS"
[dev]
port = 3000
[ai]
binding = "AI"
[[kv_namespaces]]
binding = "KV"
id = "ef93d42dc4b34969bab404d2e80f8dd3"
[[analytics_engine_datasets]]
binding = "ANALYTICS"
dataset = "sink"