mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-25 21:25:52 +10:00
Merge branch 'next' of https://github.com/vuejs/vuepress into next
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user