Skip to content

Commit

Permalink
basename -> base
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Skinner committed Sep 15, 2023
1 parent 22aa92d commit 9b6b160
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
9 changes: 5 additions & 4 deletions packages/vue-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import BugsnagPerformance from '@bugsnag/browser-performance'
import { VueRouterRoutingProvider } from '@bugsnag/vue-router-performance'
import { createRouter, createWebHistory } from 'vue-router'
const base = 'my-app
const router = createRouter({
history: createWebHistory('vue-router'),
history: createWebHistory(base),
routes: [
{
path: '/',
Expand All @@ -20,16 +22,15 @@ const router = createRouter({
{
path: '/contacts/:contactId',
name: 'contact',
component: () => import('../views/ContactView.vue')
component: () => import('./views/ContactView.vue')
}
]
})
const basename = '/vue-router'
BugsnagPerformance.start({
apiKey,
routingProvider: new VueRouterRoutingProvider(router, basename)
routingProvider: new VueRouterRoutingProvider(router, base)
})
const app = createApp(App)
Expand Down
23 changes: 21 additions & 2 deletions test/browser/features/fixtures/packages/vue-router/src/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from './views/HomeView.vue'
import App from './App.vue'
import router from './router'
import BugsnagPerformance from '@bugsnag/browser-performance'
Expand All @@ -8,15 +10,32 @@ const parameters = new URLSearchParams(window.location.search)
const apiKey = parameters.get('api_key')
const endpoint = parameters.get('endpoint')

const basename = '/vue-router'
const base = '/vue-router'

const router = createRouter({
history: createWebHistory(base),
routes: [
{
path: '/',
name: 'home',
component: HomeView
},
{
path: '/contacts/:contactId',
name: 'contact',
component: () => import('./views/ContactView.vue')
}
]
})


BugsnagPerformance.start({
apiKey,
endpoint,
maximumBatchSize: 13,
batchInactivityTimeoutMs: 5000,
autoInstrumentNetworkRequests: false,
routingProvider: new VueRouterRoutingProvider(router, basename)
routingProvider: new VueRouterRoutingProvider(router, base)
})

const app = createApp(App)
Expand Down

This file was deleted.

0 comments on commit 9b6b160

Please sign in to comment.