From f215c58eaebbf1d32f503971de6f3528fae0a8bb Mon Sep 17 00:00:00 2001 From: ccbikai Date: Tue, 20 May 2025 21:32:27 +0800 Subject: [PATCH] chore: disable sourcemaps and update build configs - Disables sourcemap generation in Nuxt for production optimization - Adds esbuild to pnpm workspace built dependencies - Updates Cloudflare Worker configuration to use Node.js compatibility mode - Removes source map upload from worker configuration These changes optimize the production build process and enhance worker compatibility.v --- nuxt.config.ts | 3 ++- pnpm-workspace.yaml | 1 + wrangler.toml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index 0b0a1ad..82ce9ae 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -3,7 +3,6 @@ import { currentLocales } from './i18n/i18n' // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ - modules: [ '@nuxthub/core', 'shadcn-nuxt', @@ -54,6 +53,8 @@ export default defineNuxtConfig({ }, }, + sourcemap: false, + future: { compatibilityVersion: 4, }, diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3e3ca13..de32796 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,5 @@ onlyBuiltDependencies: + - esbuild - sharp - simple-git-hooks - unrs-resolver diff --git a/wrangler.toml b/wrangler.toml index a857961..43b5ef8 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,7 +1,7 @@ name = "sink" main = "dist/server/index.mjs" compatibility_date = "2025-05-08" -upload_source_maps = true +compatibility_flags = [ "nodejs_compat" ] [assets] directory = "dist/public"