diff --git a/apps/pigment-css-next-app/next.config.js b/apps/pigment-css-next-app/next.config.js index 5f14d9c8..ed08ec1e 100644 --- a/apps/pigment-css-next-app/next.config.js +++ b/apps/pigment-css-next-app/next.config.js @@ -2,7 +2,7 @@ // eslint-ignore-next-line import/no-unresolved const { withPigment } = require('@pigment-css/nextjs-plugin'); const { experimental_extendTheme: extendTheme } = require('@mui/material/styles'); -const styledEngineMockup = require('@pigment-css/react/styledEngineMockup'); +const { internal_styledEngineMockup } = require('@pigment-css/react'); /** * @typedef {import('@pigment-css/nextjs-plugin').PigmentOptions} PigmentOptions @@ -119,7 +119,7 @@ const pigmentOptions = { ...context, require: (id) => { if (id === '@mui/styled-engine' || id === '@mui/styled-engine-sc') { - return styledEngineMockup; + return internal_styledEngineMockup; } return context.require(id); }, diff --git a/packages/pigment-css-unplugin/src/index.ts b/packages/pigment-css-unplugin/src/index.ts index 1cb347f9..89658b2a 100644 --- a/packages/pigment-css-unplugin/src/index.ts +++ b/packages/pigment-css-unplugin/src/index.ts @@ -25,7 +25,7 @@ import { type PluginCustomOptions, } from '@pigment-css/react/utils'; import type { ResolvePluginInstance } from 'webpack'; -import styledEngineMockup from '@pigment-css/react/styledEngineMockup'; +import { internal_styledEngineMockup } from '@pigment-css/react'; import { handleUrlReplacement, type AsyncResolver } from './utils'; @@ -88,7 +88,7 @@ const addMaterialUIOverriedContext = (originalContext: Record) const originalRequire = originalContext.require as (id: string) => any; const newRequire = (id: string) => { if (id === '@mui/styled-engine' || id === '@mui/styled-engine-sc') { - return styledEngineMockup; + return internal_styledEngineMockup; } return originalRequire(id); }; diff --git a/packages/pigment-css-vite-plugin/src/vite-plugin.ts b/packages/pigment-css-vite-plugin/src/vite-plugin.ts index 7d71dc80..19bd92a2 100644 --- a/packages/pigment-css-vite-plugin/src/vite-plugin.ts +++ b/packages/pigment-css-vite-plugin/src/vite-plugin.ts @@ -21,7 +21,7 @@ import { type IFileReporterOptions, } from '@wyw-in-js/transform'; import { matchAdapterPath, type PluginCustomOptions } from '@pigment-css/react/utils'; -import styledEngineMockup from '@pigment-css/react/styledEngineMockup'; +import { internal_styledEngineMockup } from '@pigment-css/react'; export type VitePluginOptions = { debug?: IFileReporterOptions | false | null | undefined; @@ -46,7 +46,7 @@ const addMaterialUIOverriedContext = (originalContext: Record) const originalRequire = originalContext.require as (id: string) => any; const newRequire = (id: string) => { if (id === '@mui/styled-engine' || id === '@mui/styled-engine-sc') { - return styledEngineMockup; + return internal_styledEngineMockup; } return originalRequire(id); };