diff --git a/lib/common/nuxt.config.js b/lib/common/nuxt.config.js index 7a9e507acd..a596bfcc51 100644 --- a/lib/common/nuxt.config.js +++ b/lib/common/nuxt.config.js @@ -112,7 +112,7 @@ export default { duration: 5000, rtl: false }, - loadingIndicator: {}, + loadingIndicator: false, transition: { name: 'page', mode: 'out-in', diff --git a/lib/common/options.mjs b/lib/common/options.mjs index 624f427ad0..1b4f3fdc94 100644 --- a/lib/common/options.mjs +++ b/lib/common/options.mjs @@ -103,9 +103,22 @@ Options.from = function (_options) { options.store = true } - // Normalize loadingIndicator - if (!isPureObject(options.loadingIndicator)) { - options.loadingIndicator = { name: options.loadingIndicator } + // SPA loadingIndicator + if (options.loadingIndicator) { + // Normalize loadingIndicator + if (!isPureObject(options.loadingIndicator)) { + options.loadingIndicator = { name: options.loadingIndicator } + } + + // Apply defaults + options.loadingIndicator = Object.assign( + { + name: 'pulse', + color: '#dbe1ec', + background: 'white' + }, + options.loadingIndicator + ) } // Apply default hash to CSP option @@ -113,16 +126,6 @@ Options.from = function (_options) { options.render.csp = { hashAlgorithm: 'sha256' } } - // Apply defaults to loadingIndicator - options.loadingIndicator = Object.assign( - { - name: 'pulse', - color: '#dbe1ec', - background: 'white' - }, - options.loadingIndicator - ) - // cssSourceMap if (options.build.cssSourceMap === undefined) { options.build.cssSourceMap = options.dev