diff --git a/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js b/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js index d817960b74..13c30b679e 100644 --- a/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js +++ b/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js @@ -149,7 +149,7 @@ module.exports = function createBaseConfig (context, isServer) { // i.e. // @vuepress/* // vuepress-* - if (/(@vuepress\/[^\/]*|vuepress-[^\/]*)\/(?!node_modules).*\.js$/.test(filePath)) { + if (/(@vuepress[\/\\][^\/\\]*|vuepress-[^\/\\]*)[\/\\](?!node_modules).*\.js$/.test(filePath)) { return false } // Don't transpile node_modules