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)})`