Skip to content

Commit

Permalink
Fix extra polyfill and update size-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Sep 5, 2020
1 parent 7527106 commit 0631da6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/next/next-server/lib/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,9 @@ export default class Router implements BaseRouter {
resolvedAs = delBasePath(resolvedAs)

if (isDynamicRoute(route)) {
const { pathname: asPathname, ...parsedAs } = parseRelativeUrl(resolvedAs)
const parsedAs = parseRelativeUrl(resolvedAs)
const asPathname = parsedAs.pathname

const routeRegex = getRouteRegex(route)
const routeMatch = getRouteMatcher(routeRegex)(asPathname)
if (!routeMatch) {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/build-output/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('Build Output', () => {
expect(indexSize.endsWith('B')).toBe(true)

// should be no bigger than 60.2 kb
expect(parseFloat(indexFirstLoad) - 60.2).toBeLessThanOrEqual(0)
expect(parseFloat(indexFirstLoad) - 60.3).toBeLessThanOrEqual(0)
expect(indexFirstLoad.endsWith('kB')).toBe(true)

expect(parseFloat(err404Size) - 3.5).toBeLessThanOrEqual(0)
Expand All @@ -104,7 +104,7 @@ describe('Build Output', () => {
expect(parseFloat(err404FirstLoad) - 63.4).toBeLessThanOrEqual(0)
expect(err404FirstLoad.endsWith('kB')).toBe(true)

expect(parseFloat(sharedByAll) - 59.9).toBeLessThanOrEqual(0)
expect(parseFloat(sharedByAll) - 60).toBeLessThanOrEqual(0)
expect(sharedByAll.endsWith('kB')).toBe(true)

if (_appSize.endsWith('kB')) {
Expand Down

0 comments on commit 0631da6

Please sign in to comment.