diff --git a/lib/prepare.js b/lib/prepare.js index a2a4c16708..2d0fc56db2 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -46,11 +46,9 @@ if (!Object.assign) Object.assign = require('object-assign')` await writeTemp('polyfill.js', polyfillCode) // 5. handle user override - if (options.useDefaultTheme) { - const overridePath = path.resolve(sourceDir, '.vuepress/override.styl') - const hasUserOverride = fs.existsSync(overridePath) - await writeTemp(`override.styl`, hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``) - } + const overridePath = path.resolve(sourceDir, '.vuepress/override.styl') + const hasUserOverride = options.useDefaultTheme && fs.existsSync(overridePath) + await writeTemp(`override.styl`, hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``) async function writeEnhanceTemp (destName, srcPath, isEnhanceExist) { await writeTemp(