Skip to content

Any plans to support Next JS "/pages" Router? #419

@Deckstar

Description

@Deckstar

Summary

Hi,

This looks like a great initiative! I would love to use MUI with compiled CSS instead of emotion. But after looking at the docs and the example projects, I can see that, as of now, only the "/app" router is supported. In fact, I just tried to use the latest version with the pages router, and my page ended up compiling forever 😄

So this is a very simple question post: are there any plans to support the Next JS pages Router as well? Or will Pigment CSS only work with the newer app Router?


According to leerob, NextJS is "committed to supporting the Pages Router for many years in the future". So I'm assuming it wouldn't be a wasted effort to support it from the Pigment CSS side.

So here I am, asking this question so it could be recorded in writing 😊

Thank you for your time!

Examples

No response

Motivation

Obvious motivation:

  • I want to get rid of the dependency on emotion & client-side JSS styling in my Next JS app that was built using the pages router,
  • while:
    • still using MUI and all the convenience it provides
    • still being able to have type-safe CSS styling
    • still being able to have server-side rendering

I imagine plenty of other legacy projects (or even new projects!) might want to do the same 😄

Search keywords: nextjs, next.js, pages, router, ssr

Metadata

Metadata

Assignees

Labels

integration: nextjsNext.jsscope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIstatus: waiting for maintainerThese issues haven't been looked at yet by a maintainer.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions