Skip to content

Commit

Permalink
build: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
romgrk committed Aug 30, 2024
1 parent 5d93691 commit f513a43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/pigment-css-next-app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
},
Expand Down
4 changes: 2 additions & 2 deletions packages/pigment-css-unplugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -88,7 +88,7 @@ const addMaterialUIOverriedContext = (originalContext: Record<string, unknown>)
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);
};
Expand Down
4 changes: 2 additions & 2 deletions packages/pigment-css-vite-plugin/src/vite-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -46,7 +46,7 @@ const addMaterialUIOverriedContext = (originalContext: Record<string, unknown>)
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);
};
Expand Down

0 comments on commit f513a43

Please sign in to comment.