From 91952c142b8efd35facd650dbd2544a01cd797c6 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Sat, 14 May 2022 16:17:48 +0800 Subject: [PATCH] fix? --- packages/docusaurus/src/server/index.ts | 2 +- packages/docusaurus/src/webpack/base.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus/src/server/index.ts b/packages/docusaurus/src/server/index.ts index 3a9213faf1008..07b1f18f9f137 100644 --- a/packages/docusaurus/src/server/index.ts +++ b/packages/docusaurus/src/server/index.ts @@ -199,7 +199,7 @@ ${Object.entries(registry) JSON.stringify(routesChunkNames, null, 2), ); - const genRoutes = generate(generatedFilesDir, 'routes.js', routesConfig); + const genRoutes = generate(generatedFilesDir, 'routes.mjs', routesConfig); const genGlobalData = generate( generatedFilesDir, diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 3f45ada648051..7fd9879e89b44 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -205,7 +205,7 @@ export async function createBaseConfig( fileLoaderUtils.rules.svg(), fileLoaderUtils.rules.otherAssets(), { - test: /\.[jt]sx?$/i, + test: /\.[mc]?[jt]sx?$/i, exclude: excludeJS, use: [ getCustomizableJSLoader(siteConfig.webpack?.jsLoader)({