From 71b808c8e96ae8bdbe4440f16d96f7242f864843 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 19 Apr 2022 20:12:28 +0100 Subject: [PATCH] fix(schema): use entire object for `app` properties (#4431) --- packages/schema/src/config/_common.ts | 6 +++--- packages/schema/src/config/build.ts | 2 +- packages/schema/src/config/generate.ts | 2 +- packages/schema/src/config/router.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/schema/src/config/_common.ts b/packages/schema/src/config/_common.ts index faf446ae75..26e6655ab4 100644 --- a/packages/schema/src/config/_common.ts +++ b/packages/schema/src/config/_common.ts @@ -725,9 +725,9 @@ export default { ...get('privateRuntimeConfig'), public: get('publicRuntimeConfig'), app: { - baseURL: get('app.baseURL'), - buildAssetsDir: get('app.buildAssetsDir'), - cdnURL: get('app.cdnURL'), + baseURL: get('app').baseURL, + buildAssetsDir: get('app').buildAssetsDir, + cdnURL: get('app').cdnURL, } }) }, diff --git a/packages/schema/src/config/build.ts b/packages/schema/src/config/build.ts index 47f2ba9824..239be9efc9 100644 --- a/packages/schema/src/config/build.ts +++ b/packages/schema/src/config/build.ts @@ -192,7 +192,7 @@ export default { * @version 2 */ publicPath: { - $resolve: (val, get) => val ? withTrailingSlash(normalizeURL(val)) : get('app.buildAssetsDir') + $resolve: (val, get) => val ? withTrailingSlash(normalizeURL(val)) : get('app').buildAssetsDir }, /** diff --git a/packages/schema/src/config/generate.ts b/packages/schema/src/config/generate.ts index 07422951fd..3d15e97847 100644 --- a/packages/schema/src/config/generate.ts +++ b/packages/schema/src/config/generate.ts @@ -160,7 +160,7 @@ export default { * The full path to the directory underneath `/_nuxt/` where static assets * (payload, state and manifest files) will live. */ - base: { $resolve: (val, get) => val || joinURL(get('app.buildAssetsDir'), get('generate.dir')) }, + base: { $resolve: (val, get) => val || joinURL(get('app').buildAssetsDir, get('generate.dir')) }, /** The full path to the versioned directory where static assets for the current buidl are located. */ versionBase: { $resolve: (val, get) => val || joinURL(get('generate.base'), get('generate.version')) }, /** A unique string to uniquely identify payload versions (defaults to the current timestamp). */ diff --git a/packages/schema/src/config/router.ts b/packages/schema/src/config/router.ts index 680d3148fb..9a59a23857 100644 --- a/packages/schema/src/config/router.ts +++ b/packages/schema/src/config/router.ts @@ -33,7 +33,7 @@ export default { * @version 2 */ base: { - $resolve: (val, get) => val ? withTrailingSlash(normalizeURL(val)) : get('app.baseURL') + $resolve: (val, get) => val ? withTrailingSlash(normalizeURL(val)) : get('app').baseURL }, /** @private */