We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the styles import to be customised, so that component libraries can abstract away the underlying styling solution.
const { withPigment } = require('@pigment-css/nextjs-plugin'); module.exports = withPigment({ importName: '@mycompany/styles.css' })(nextJsConfig);
Then:
import type { Metadata } from 'next'; +import '@mycompany/styles.css'; export const metadata: Metadata = { title: 'Create Next App', description: 'Generated by create next app', }; export default function RootLayout(props: { children: React.ReactNode }) { return ( <html lang="en"> <body>{props.children}</body> </html> ); }
Then libraries can export their own plugin:
export const withMyCompanyLibrary = withPigment({ importName: '@mycompany/styles.css' })
Avoid exposing Pigment CSS usage as the styling mechanism for those libraries that do not use other Pigment CSS consumer facing features.
Search keywords: import customisation
The text was updated successfully, but these errors were encountered:
Sounds like a nice addition to the current options. I'll mark this to be taken into consideration before our stable release.
Sorry, something went wrong.
brijeshb42
No branches or pull requests
Summary
Allow the styles import to be customised, so that component libraries can abstract away the underlying styling solution.
Examples
Then:
import type { Metadata } from 'next'; +import '@mycompany/styles.css'; export const metadata: Metadata = { title: 'Create Next App', description: 'Generated by create next app', }; export default function RootLayout(props: { children: React.ReactNode }) { return ( <html lang="en"> <body>{props.children}</body> </html> ); }
Then libraries can export their own plugin:
Motivation
Avoid exposing Pigment CSS usage as the styling mechanism for those libraries that do not use other Pigment CSS consumer facing features.
Search keywords: import customisation
The text was updated successfully, but these errors were encountered: