File tree Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 19
19
"import" : " ./dist/module.mjs" ,
20
20
"require" : " ./dist/module.cjs" ,
21
21
"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"
24
24
}
25
25
},
26
26
"./core" : {
Original file line number Diff line number Diff line change @@ -75,18 +75,22 @@ export default defineNuxtModule<ModuleOptions>({
75
75
76
76
// Extend vite config
77
77
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
+ }
90
94
} )
91
95
92
96
// Use local pdf worker
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
12
12
import { joinURL , isRelative } from 'ufo'
13
13
14
14
export default defineNuxtPlugin ( {
15
- name : 'persona- plugin' ,
15
+ name : 'persona: plugin' ,
16
16
setup : ( nuxtApp ) => {
17
17
const router = useRouter ( )
18
18
const store = initStore ( )
@@ -28,7 +28,7 @@ export default defineNuxtPlugin({
28
28
} )
29
29
30
30
// Set CDN to self host
31
- if ( config . public . persona . cdnURL ) {
31
+ if ( config . public . persona ? .cdnURL ) {
32
32
const cdnURL = isRelative ( config . public . persona . cdnURL )
33
33
? joinURL ( config . app . baseURL , config . public . persona . cdnURL )
34
34
: config . public . persona . cdnURL
You can’t perform that action at this time.
0 commit comments