Skip to content

Commit

Permalink
Load commonjs with require
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Feb 15, 2024
1 parent 36db6ed commit 2ccdfcb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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, '../');

Expand Down

0 comments on commit 2ccdfcb

Please sign in to comment.