Skip to content

Commit 1594dbf

Browse files
committed
style: tweaks
1 parent 5673319 commit 1594dbf

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

lib/loader.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@ module.exports = function (content) {
344344
// check named exports
345345
output +=
346346
'if (Component.esModule && Object.keys(Component.esModule).some(function (key) {' +
347-
'return key !== "default" && key.substr(0, 2) !== "__"' +
347+
' return key !== "default" && key.substr(0, 2) !== "__"' +
348348
'})) {' +
349-
'console.error("named exports are not supported in *.vue files.")' +
349+
' console.error("named exports are not supported in *.vue files.")' +
350350
'}\n'
351351
}
352352

@@ -368,11 +368,9 @@ module.exports = function (content) {
368368
}
369369

370370
output +=
371-
'var customBlock = ' +
372-
requireString +
373-
'\n' +
371+
'var customBlock = ' + requireString + '\n' +
374372
'if (typeof customBlock === "function") {' +
375-
'customBlock(Component)' +
373+
' customBlock(Component)' +
376374
'}\n'
377375
}
378376
})
@@ -442,9 +440,7 @@ module.exports = function (content) {
442440

443441
function getImport (type, part, index, scoped) {
444442
return (
445-
'import __vue_' +
446-
type +
447-
'__ from ' +
443+
'import __vue_' + type + '__ from ' +
448444
getRequireString(type, part, index, scoped)
449445
)
450446
}
@@ -469,9 +465,7 @@ module.exports = function (content) {
469465

470466
function getImportForImport (type, impt, scoped) {
471467
return (
472-
'import __vue_' +
473-
type +
474-
'__ from ' +
468+
'import __vue_' + type + '__ from ' +
475469
getRequireForImportString(type, impt, scoped)
476470
)
477471
}

lib/template-compiler/index.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,8 @@ module.exports = function (html) {
9494
'\nif (module.hot) {\n' +
9595
' module.hot.accept()\n' +
9696
' if (module.hot.data) {\n' +
97-
' require("' +
98-
hotReloadAPIPath +
99-
'").rerender("' +
100-
options.id +
101-
'", ' +
102-
exportsName +
103-
')\n' +
97+
' require("' + hotReloadAPIPath + '")' +
98+
' .rerender("' + options.id + '", ' + exportsName + ')\n' +
10499
' }\n' +
105100
'}'
106101
}

0 commit comments

Comments
 (0)