From 022cd49e49b79236da4f797284de58862a06a39b Mon Sep 17 00:00:00 2001 From: NonPolynomial Date: Sat, 5 Jan 2019 15:08:48 +0100 Subject: [PATCH] fix: normalize override stylus file path in windows --- packages/@vuepress/core/lib/internal-plugins/palette/index.js | 1 + packages/@vuepress/core/lib/internal-plugins/style/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/@vuepress/core/lib/internal-plugins/palette/index.js b/packages/@vuepress/core/lib/internal-plugins/palette/index.js index 3120e9e47b..ca312481a2 100644 --- a/packages/@vuepress/core/lib/internal-plugins/palette/index.js +++ b/packages/@vuepress/core/lib/internal-plugins/palette/index.js @@ -22,6 +22,7 @@ module.exports = (options, ctx) => ({ const themePalette = path.resolve(ctx.themePath, 'styles/palette.styl') const userPalette = path.resolve(sourceDir, '.vuepress/styles/palette.styl') + .replace(/[\\]+/g, '/') const themePaletteContent = fs.existsSync(themePalette) ? `@import(${JSON.stringify(themePalette)})` diff --git a/packages/@vuepress/core/lib/internal-plugins/style/index.js b/packages/@vuepress/core/lib/internal-plugins/style/index.js index cd89b965bc..e1754e8bbe 100644 --- a/packages/@vuepress/core/lib/internal-plugins/style/index.js +++ b/packages/@vuepress/core/lib/internal-plugins/style/index.js @@ -17,6 +17,7 @@ module.exports = (options, ctx) => ({ const themeStyle = path.resolve(ctx.themePath, 'styles/index.styl') const userStyle = path.resolve(sourceDir, '.vuepress/styles/index.styl') + .replace(/[\\]+/g, '/') const themeStyleContent = fs.existsSync(themeStyle) ? `@import(${JSON.stringify(themeStyle)})`