Merge branch 'next' of https://github.com/vuejs/vuepress into next

This commit is contained in:
ULIVZ
2018-09-05 01:06:59 +08:00
2 changed files with 2 additions and 2 deletions
@@ -1,7 +1,7 @@
function genImportAsyncComponentFile (pages) {
return `export function loadComponent (key) {
switch (key) {
${pages.map(({ key, _filePath }) => ` case "${key}": return import("${_filePath}");`).join('\n')}
${pages.map(({ key, _filePath }) => ` case ${JSON.stringify(key)}: return import(${JSON.stringify(_filePath)});`).join('\n')}
}
}`
}
@@ -51,7 +51,7 @@ module.exports = class EnhanceAppFilesOption extends Option {
if (fs.existsSync(filePath)) {
destPath = await context.writeTemp(
`app-enhancers/enhancer-${moduleId++}.js`,
`export { default } from '${(filePath)}'`
`export { default } from ${JSON.stringify(filePath)}`
)
} else {
logger.debug(