Skip to content

Commit 736e4ba

Browse files
committed
fix(persona): fix missing scroll-into-view
1 parent e9781ee commit 736e4ba

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

packages/persona/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"import": "./dist/module.mjs",
2020
"require": "./dist/module.cjs",
2121
"types": {
22-
"import": "./dist/types.d.mts",
23-
"require": "./dist/types.d.ts"
22+
"import": "./dist/module.d.mts",
23+
"require": "./dist/module.d.ts"
2424
}
2525
},
2626
"./core": {

packages/persona/src/module.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,22 @@ export default defineNuxtModule<ModuleOptions>({
7575

7676
// Extend vite config
7777
extendViteConfig((config) => {
78-
config.optimizeDeps?.exclude?.push('@privyid/persona')
79-
config.optimizeDeps?.include?.push(
80-
'@testing-library/user-event',
81-
'interactjs',
82-
'@jill64/universal-sanitizer',
83-
'scroll-into-view',
84-
'webfontloader',
85-
'zxcvbn',
86-
'pdfjs-dist',
87-
'pdfjs-dist/web/pdf_viewer',
88-
'vuedraggable',
89-
)
78+
config.optimizeDeps = {
79+
...config.optimizeDeps,
80+
exclude: [...config.optimizeDeps?.exclude ?? [], '@privyid/persona'],
81+
include: [
82+
...config.optimizeDeps?.include ?? [],
83+
'@testing-library/user-event',
84+
'interactjs',
85+
'@jill64/universal-sanitizer',
86+
'scroll-into-view',
87+
'webfontloader',
88+
'zxcvbn',
89+
'pdfjs-dist',
90+
'pdfjs-dist/web/pdf_viewer',
91+
'vuedraggable',
92+
],
93+
}
9094
})
9195

9296
// Use local pdf worker

packages/persona/src/runtime/plugins/persona.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { joinURL, isRelative } from 'ufo'
1313

1414
export default defineNuxtPlugin({
15-
name : 'persona-plugin',
15+
name : 'persona:plugin',
1616
setup: (nuxtApp) => {
1717
const router = useRouter()
1818
const store = initStore()
@@ -28,7 +28,7 @@ export default defineNuxtPlugin({
2828
})
2929

3030
// Set CDN to self host
31-
if (config.public.persona.cdnURL) {
31+
if (config.public.persona?.cdnURL) {
3232
const cdnURL = isRelative(config.public.persona.cdnURL)
3333
? joinURL(config.app.baseURL, config.public.persona.cdnURL)
3434
: config.public.persona.cdnURL

0 commit comments

Comments
 (0)