Closed yousif-bugsnag closed 4 months ago
NPM build
Package | |
---|---|
Before | 190.24 kB |
After | 190.24 kB |
± | No change |
CDN build
Unminified | Minfied | Minified + gzipped | |
---|---|---|---|
Before | 95.65 kB |
35.92 kB |
10.87 kB |
After | 95.65 kB |
35.92 kB |
10.87 kB |
± | No change | No change | No change |
Ok | File (✨=New File) | Lines | Branches | Functions | Statements |
---|---|---|---|---|---|
🔴 | /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/vue-router/lib/vue-router-routing-provider.ts | 92.85% (-1.59%) |
80% (-5%) |
80% (-8.88%) |
92.85% (-1.88%) |
Total:
Lines | Branches | Functions | Statements |
---|---|---|---|
87.09%(-0.03%) | 78.37%(-0.15%) | 87.96%(-0.1%) | 83.88%(-0.04%) |
Generated against 7247e51554db5c37faaf7b618825f54a11722d9f on 25 July 2024 at 15:11:12 UTC
Don't forget the changelog entry! 👍🏻
Goal
Replace the usage of
path-to-regexp
and use Vue'srouter.resolve
to resolve routes inVueRoutingProvider
.Fixes an issue where routes with parantheses (generated by nuxt) were failing to resolve (see #460)
Design
v4 of
vue-router
(which we depend on) no longer usespath-to-regexp
internally to parse routes, and now uses its own parsing system that supports dynamic routing.The router object has a
resolve
method that seems to do what we need (find a corresponding route from a given URL) - and also removes the need to flatten routes when resolving.Changeset
Testing
Updated the e2e tests to include a nested route and a route with parentheses