github remix-run/remix route-pattern@0.20.1
route-pattern v0.20.1

Patch Changes

  • Matches return decoded values for params in hostname

    pattern = new RoutePattern('://:subdomain.example.com/posts/:slug')
    
    url = new URL('https://café.example.com/posts/123')
    pattern.match(url)?.params.subdomain
    // Before -> 'xn--caf-dma'
    // After -> 'café'
    
    url = new URL('https://北京.example.com/posts/123')
    pattern.match(url)?.params.subdomain
    // Before -> 'xn--1lq90i'
    // After -> '北京'

Don't miss a new remix release

NewReleases is sending notifications on new releases.