File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const hotApi = require.resolve('./lib/hot-api.js');
6
6
7
7
const { version } = require ( 'svelte/package.json' ) ;
8
8
const major_version = + version [ 0 ] ;
9
+ const minor_version = + version [ 1 ] ;
9
10
const { compile, preprocess } = major_version >= 3
10
11
? require ( 'svelte/compiler' )
11
12
: require ( 'svelte' ) ;
@@ -15,8 +16,7 @@ const pluginOptions = {
15
16
hotReload : true ,
16
17
hotOptions : true ,
17
18
preprocess : true ,
18
- emitCss : true ,
19
-
19
+ emitCss : true ,
20
20
// legacy
21
21
onwarn : true ,
22
22
shared : true ,
@@ -122,6 +122,9 @@ module.exports = function(source, map) {
122
122
123
123
if ( major_version >= 3 ) {
124
124
// TODO anything?
125
+ if ( isServer ) { //do minor version check here to see ensure if svelte has 'hash' option enabled
126
+ compileOptions . hash = hash ( this . request )
127
+ }
125
128
} else {
126
129
compileOptions . shared = options . shared || 'svelte/shared.js' ;
127
130
compileOptions . name = capitalize ( sanitize ( compileOptions . filename ) ) ;
You can’t perform that action at this time.
0 commit comments