diff --git a/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js b/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js index 93723c260a..ebf6649061 100644 --- a/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js +++ b/packages/@vuepress/core/lib/node/webpack/createBaseConfig.js @@ -135,7 +135,7 @@ module.exports = function createBaseConfig (context, isServer) { const libDir = path.join(__dirname, '..') config.module .rule('js') - .test(/\.js$/) + .test(/\.jsx?$/) .exclude.add(filePath => { // Always transpile lib directory if (filePath.startsWith(libDir)) {