Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed May 14, 2022
1 parent d79e8f9 commit 81ab334
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/docusaurus/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion packages/docusaurus/src/webpack/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export async function createBaseConfig(
'.tsx',
'.json',
],
// Allow omitting extension even when the current file is ESM
fullySpecified: false,
symlinks: true, // See https://github.com/facebook/docusaurus/issues/3272
roots: [
// Allow resolution of url("/fonts/xyz.ttf") by webpack
Expand Down Expand Up @@ -205,7 +207,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)({
Expand Down

0 comments on commit 81ab334

Please sign in to comment.