From f771edc5605dd7cb7f86a917eecda929d071c3b2 Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Sun, 2 Feb 2020 02:01:44 +0800 Subject: [PATCH] fix($core): resolve jsx files by default (close #2058) (#2059) --- packages/@vuepress/core/lib/node/webpack/createBaseConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) {