diff --git a/packages/vue-renderer/src/renderers/ssr.js b/packages/vue-renderer/src/renderers/ssr.js index 543c1f5c04..ed7aba75bf 100644 --- a/packages/vue-renderer/src/renderers/ssr.js +++ b/packages/vue-renderer/src/renderers/ssr.js @@ -4,7 +4,7 @@ import { format } from 'util' import fs from 'fs-extra' import consola from 'consola' import { TARGETS, urlJoin } from '@nuxt/utils' -import { parsePath, withoutTrailingSlash } from 'ufo' +import { decode, parsePath, withoutTrailingSlash } from 'ufo' import devalue from '@nuxt/devalue' import { createBundleRenderer } from 'vue-server-renderer' import BaseRenderer from './base' @@ -210,7 +210,7 @@ export default class SSRRenderer extends BaseRenderer { // Page level payload.js (async loaded for CSR) const payloadPath = urlJoin(url, 'payload.js') const payloadUrl = urlJoin(staticAssetsBase, payloadPath) - const routePath = withoutTrailingSlash(parsePath(url).pathname) + const routePath = withoutTrailingSlash(decode(parsePath(url).pathname)) const payloadScript = `__NUXT_JSONP__("${routePath}", ${devalue({ data, fetch, mutations })});` staticAssets.push({ path: payloadPath, src: payloadScript }) preloadScripts.push(payloadUrl)