woonuxt icon indicating copy to clipboard operation
woonuxt copied to clipboard

Feature/env guard

Open scottyzen opened this issue 3 months ago • 2 comments

This pull request updates environment validation and configuration for the Nuxt application, ensuring required environment variables are present and correctly formatted before startup. It also upgrades dependencies and refines server-side rendering rules for specific routes.

Environment validation and configuration:

  • Added a new validateEnv function in envGuard.ts to check for required environment variables (GQL_HOST, NUXT_IMAGE_DOMAINS) and exit with an error message if they're missing or invalid.
  • Integrated the new environment validation step into nuxt.config.ts, ensuring configuration fails early if environment variables are misconfigured.
  • Refactored how modules and GraphQL client configuration are declared in nuxt.config.ts, now using direct values from process.env instead of fallback variables.

Dependency and configuration updates:

  • Updated Nuxt version in both package.json and woonuxt_base/package.json (nuxt to ^4.0.3, app version to 4.5.3). [1] [2]
  • Changed route rules for /checkout/order-received/** and /order-summary/** to use { prerender: false } instead of { ssr: false } in Nuxt Nitro configuration.

scottyzen avatar Aug 10 '25 19:08 scottyzen

Deploy Preview for sleepy-chandrasekhar-717c3d ready!

Name Link
Latest commit 067b0e3acecc24dbae1530470797d8f4b01e8b1c
Latest deploy log https://app.netlify.com/projects/sleepy-chandrasekhar-717c3d/deploys/6898f00e3481e800082e6caf
Deploy Preview https://deploy-preview-319--sleepy-chandrasekhar-717c3d.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Aug 10 '25 19:08 netlify[bot]

Deploying woo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 067b0e3
Status: ✅  Deploy successful!
Preview URL: https://0323499e.woo-ijf.pages.dev
Branch Preview URL: https://feature-envguard.woo-ijf.pages.dev

View logs