Skip to content

Commit

Permalink
Avoid duplicate declaration error when a file already imports Vue (kt…
Browse files Browse the repository at this point in the history
  • Loading branch information
Toilal authored and ktsn committed Mar 17, 2017
1 parent c167681 commit f4bd9c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ module.exports = function(contents) {

function genHotReload (id) {
return `
if (module.hot) {
var options = __component__
if (module.hot) {(function(options) {
if (typeof options === 'function') {
options = __component__.options
}
Expand All @@ -63,6 +62,6 @@ if (module.hot) {
} else {
api.reload(${id}, options)
}
}
}})(__component__)
}`
}

0 comments on commit f4bd9c8

Please sign in to comment.