Commit a2562ede authored by Niklas Mischkulnig's avatar Niklas Mischkulnig

encode polyfill path

parent b4d5a29c
......@@ -217,6 +217,7 @@ import { imageConfigDefault } from '../../shared/lib/image-config'
import { RenderStage, StagedRenderingController } from './staged-rendering'
import { anySegmentHasRuntimePrefetchEnabled } from './staged-validation'
import { warnOnce } from '../../shared/lib/utils/warn-once'
import { encodeURIPath } from '../../shared/lib/encode-uri-path'
export type GetDynamicParamFromSegment = (
// [slug] / [[slug]] / [...slug]
......@@ -2528,7 +2529,7 @@ async function renderToStream(
polyfill.endsWith('.js') && !polyfill.endsWith('.module.js')
)
.map((polyfill) => ({
src: `${assetPrefix}/_next/${polyfill}${getAssetQueryString(
src: `${assetPrefix}/_next/${encodeURIPath(polyfill)}${getAssetQueryString(
ctx,
false
)}`,
......@@ -4129,7 +4130,7 @@ async function prerenderToStream(
polyfill.endsWith('.js') && !polyfill.endsWith('.module.js')
)
.map((polyfill) => ({
src: `${assetPrefix}/_next/${polyfill}${getAssetQueryString(
src: `${assetPrefix}/_next/${encodeURIPath(polyfill)}${getAssetQueryString(
ctx,
false
)}`,
......
/* eslint-disable jest/no-standalone-expect */
import { nextTestSetup } from 'e2e-utils'
import { ElementHandle } from 'playwright'
import { type ElementHandle } from 'playwright'
describe('scripts', () => {
const { next } = nextTestSetup({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment