From 885cc579e0ef348f311ed1fbd7f911da0cff9c91 Mon Sep 17 00:00:00 2001 From: Frank Warnaar Date: Wed, 10 May 2023 15:52:02 +0200 Subject: [PATCH] chore(netlify.toml): install dev dependencies on netlify https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-environment --- netlify.toml | 3 +-- nuxt.config.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/netlify.toml b/netlify.toml index 2a4f1503f..d79e14d21 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,8 +1,7 @@ [build] -command = "npm run build" +command = "NODE_ENV=production npm run build" [build.environment] -NODE_ENV = "production" NPM_CONFIG_AUDIT = "false" NPM_CONFIG_FUND = "false" NPM_FLAGS = "--ignore-scripts" diff --git a/nuxt.config.ts b/nuxt.config.ts index df798bc5c..7eb5252b6 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -18,6 +18,12 @@ export default defineNuxtConfig({ '@/components/app-core/index.css', ], nitro: { + esbuild: { + options: { + // allow graphql loader to use async/await in root + target: 'esnext', + } + }, prerender: { crawlLinks: false } @@ -69,6 +75,10 @@ export default defineNuxtConfig({ .then(() => { }), }, vite: { + build: { + // allow graphql loader to use async/await in root + target: 'esnext', + }, plugins: [ graphqlLoader() ]