From 2ccdfcbdd3d30ffb6bf43e35e877528ef7530864 Mon Sep 17 00:00:00 2001 From: MUI bot <2109932+Janpot@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:18:29 +0100 Subject: [PATCH] Load commonjs with require --- docs/next.config.mjs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/next.config.mjs b/docs/next.config.mjs index 3003172d42ea77..14def7cc34e9a0 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -5,17 +5,18 @@ import * as fs from 'fs'; // @ts-ignore import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { createRequire } from 'module'; -import withDocsInfra from './nextConfigDocsInfra.js'; import { findPages } from './src/modules/utils/find.mjs'; -import { + +const currentDirectory = url.fileURLToPath(new URL('.', import.meta.url)); +const require = createRequire(import.meta.url); + +const withDocsInfra = require('./nextConfigDocsInfra.js'); +const { LANGUAGES, LANGUAGES_SSR, LANGUAGES_IGNORE_PAGES, LANGUAGES_IN_PROGRESS, -} from './config.js'; - -const currentDirectory = url.fileURLToPath(new URL('.', import.meta.url)); -const require = createRequire(import.meta.url); +} = require('./config.js'); const workspaceRoot = path.join(currentDirectory, '../');