• J
    Fix link to file url behavior with trailingSlash (#14681) · 6ff3a63a
    Jan Potoms 提交于
    Avoid trailing slashes on urls that look like files. The redirect for `trailingSlash: true` will now look like:
    
    ```
    Redirects
    
    ┌ source: /:path*/:file.:ext/
    ├ destination: /:path*/:file.:ext
    └ permanent: true
    
    ┌ source: /:path*/:notfile([^/.]+)
    ├ destination: /:path*/:notfile/
    └ permanent: true
    ```
    
    The default still looks like:
    
    ```
    Redirects
    
    ┌ source: /:path+/
    ├ destination: /:path+
    └ permanent: true
    ```
    After this gets merged, I have a few optimizations planned on the normalization code that should reduce the client bundle a little and that consolidates the `trailingSlash` and `exportTrailingSlash` options
    6ff3a63a
normalize-trailing-slash.ts 437 字节