File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- const hotReloadAPIPath = require . resolve ( 'vue-hot-reload-api' )
1
+ const hotReloadAPIPath = JSON . stringify ( require . resolve ( 'vue-hot-reload-api' ) )
2
2
3
3
exports . genHotReloadCode = ( id , functional ) => {
4
4
return wrap ( `
@@ -13,7 +13,7 @@ exports.genHotReloadCode = (id, functional) => {
13
13
exports . genTemplateHotReloadCode = id => {
14
14
return wrap ( `
15
15
if (module.hot.data) {
16
- require(' ${ hotReloadAPIPath } ' ).rerender('${ id } ', {
16
+ require(${ hotReloadAPIPath } ).rerender('${ id } ', {
17
17
render: render,
18
18
staticRenderFns: staticRenderFns
19
19
})
@@ -25,7 +25,7 @@ function wrap (inner) {
25
25
return `
26
26
/* hot reload */
27
27
if (module.hot) {
28
- var api = require(' ${ hotReloadAPIPath } ' )
28
+ var api = require(${ hotReloadAPIPath } )
29
29
api.install(require('vue'))
30
30
if (api.compatible) {
31
31
module.hot.accept()
Original file line number Diff line number Diff line change 1
1
const { attrsToQuery } = require ( './utils' )
2
- const hotReloadAPIPath = require . resolve ( 'vue-hot-reload-api' )
2
+ const hotReloadAPIPath = JSON . stringify ( require . resolve ( 'vue-hot-reload-api' ) )
3
3
4
4
module . exports = function genStyleInjectionCode (
5
5
loaderContext ,
@@ -59,7 +59,7 @@ module.exports = function genStyleInjectionCode (
59
59
var newLocals = require(${ request } )
60
60
if (JSON.stringify(newLocals) !== JSON.stringify(oldLocals)) {
61
61
cssModules[${ name } ] = newLocals
62
- require(" ${ hotReloadAPIPath } " ).rerender("${ id } ")
62
+ require(${ hotReloadAPIPath } ).rerender("${ id } ")
63
63
}
64
64
}
65
65
})
You can’t perform that action at this time.
0 commit comments