File tree 3 files changed +12
-9
lines changed
apps/pigment-css-next-app
examples/pigment-css-nextjs-ts
3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1
- /* eslint-env node */
2
- // eslint-ignore-next-line import/no-unresolved
3
- const { withPigment } = require ( '@pigment-css/nextjs-plugin' ) ;
4
- const { experimental_extendTheme : extendTheme } = require ( '@mui/material/styles' ) ;
1
+ import { withPigment } from '@pigment-css/nextjs-plugin' ;
2
+ import { experimental_extendTheme as extendTheme } from '@mui/material' ;
5
3
6
4
/**
7
5
* @typedef {import('@pigment-css/nextjs-plugin').PigmentOptions } PigmentOptions
@@ -121,4 +119,4 @@ const nextConfig = {
121
119
pigment : pigmentOptions ,
122
120
} ;
123
121
124
- module . exports = withPigment ( nextConfig ) ;
122
+ export default withPigment ( nextConfig ) ;
Original file line number Diff line number Diff line change 2
2
"name" : " @app/next-app" ,
3
3
"version" : " 0.1.0" ,
4
4
"private" : true ,
5
+ "type" : " module" ,
5
6
"scripts" : {
6
7
"dev" : " next dev" ,
7
8
"build" : " next build" ,
Original file line number Diff line number Diff line change 1
- const { withPigment, extendTheme } = require ( '@pigment-css/nextjs-plugin' ) ;
1
+ import { withPigment , extendTheme } from '@pigment-css/nextjs-plugin' ;
2
2
3
3
// To learn more about theming, visit https://github.com/mui/pigment-css/blob/master/README.md#theming
4
4
const theme = extendTheme ( {
@@ -22,7 +22,11 @@ const theme = extendTheme({
22
22
} ,
23
23
} ) ;
24
24
25
- /** @type {import('next').NextConfig } */
26
- const nextConfig = { } ;
25
+ /** @type {import('@pigment-css/nextjs-plugin').WithPigmentOptions } */
26
+ const nextConfig = {
27
+ pigment : {
28
+ theme,
29
+ } ,
30
+ } ;
27
31
28
- module . exports = withPigment ( nextConfig , { theme } ) ;
32
+ module . exports = withPigment ( nextConfig ) ;
You can’t perform that action at this time.
0 commit comments