diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 4c8e22b80381..63fb0edf662a 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -36,10 +36,16 @@ import {memoize} from 'lodash'; // Utility method to get style loaders export function getStyleLoaders( isServer: boolean, - cssOptions: { + cssOptionsArg: { [key: string]: unknown; } = {}, ): RuleSetRule[] { + const cssOptions: {[key: string]: unknown} = { + // TODO turn esModule on later, see https://github.com/facebook/docusaurus/pull/6424 + esModule: false, + ...cssOptionsArg, + }; + if (isServer) { return cssOptions.modules ? [