diff --git a/lib/prepare/index.js b/lib/prepare/index.js index 70a90a45bd..7561f79158 100644 --- a/lib/prepare/index.js +++ b/lib/prepare/index.js @@ -24,11 +24,11 @@ module.exports = async function prepare (sourceDir) { await writeTemp('siteData.js', dataCode) // 4. handle user override - const overridePath = path.resolve(sourceDir, '.vuepress/override.styl') + const overridePath = path.resolve(sourceDir, '.vuepress/override.styl').replace(/[\\]+/g, '/') const hasUserOverride = fs.existsSync(overridePath) await writeTemp('override.styl', hasUserOverride ? `@import(${JSON.stringify(overridePath)})` : ``) - const stylePath = path.resolve(sourceDir, '.vuepress/style.styl') + const stylePath = path.resolve(sourceDir, '.vuepress/style.styl').replace(/[\\]+/g, '/') const hasUserStyle = fs.existsSync(stylePath) await writeTemp('style.styl', hasUserStyle ? `@import(${JSON.stringify(stylePath)})` : ``)