File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ function capitalize(str) {
22
22
const pluginOptions = {
23
23
include : true ,
24
24
exclude : true ,
25
- extensions : true
25
+ extensions : true ,
26
+ shared : true
26
27
} ;
27
28
28
29
function tryRequire ( id ) {
@@ -113,13 +114,13 @@ export default function svelte(options = {}) {
113
114
const fixedOptions = { } ;
114
115
115
116
Object . keys ( options ) . forEach ( key => {
116
- // add all options except include, exclude, extensions
117
+ // add all options except include, exclude, extensions, and shared
117
118
if ( pluginOptions [ key ] ) return ;
118
119
fixedOptions [ key ] = options [ key ] ;
119
120
} ) ;
120
121
121
122
fixedOptions . format = 'es' ;
122
- fixedOptions . shared = require . resolve ( 'svelte/shared.js' ) ;
123
+ fixedOptions . shared = require . resolve ( options . shared || 'svelte/shared.js' ) ;
123
124
fixedOptions . onerror = err => {
124
125
let message =
125
126
( err . loc ? `(${ err . loc . line } :${ err . loc . column } ) ` : '' ) + err . message ;
@@ -251,4 +252,4 @@ export default function svelte(options = {}) {
251
252
}
252
253
}
253
254
} ;
254
- }
255
+ }
You can’t perform that action at this time.
0 commit comments