Skip to content

Next.js 9.2#94

Merged
benjie merged 1 commit intographile:masterfrom
singingwolfboy:next-9.2
Jan 20, 2020
Merged

Next.js 9.2#94
benjie merged 1 commit intographile:masterfrom
singingwolfboy:next-9.2

Conversation

@singingwolfboy
Copy link
Copy Markdown
Collaborator

https://nextjs.org/blog/next-9-2

I wanted to take advantage of the new built-in CSS import support, but it seems we can't. Antd uses LESS for customizing the theme, and in order to make Next.js work with LESS, we need the @zeit/next-less package, which needs the @zeit/next-css package, which disables the new built-in CSS import support (for backwards compatibility).

We still get improved code-splitting, though!

@benjie
Copy link
Copy Markdown
Member

benjie commented Jan 19, 2020

That’s a shame, I’m a fan of CSS modules.

@benjie
Copy link
Copy Markdown
Member

benjie commented Jan 19, 2020

It looks like this has caused some duplicates in yarn.lock; please run npx yarn-deduplicate && yarn

@singingwolfboy
Copy link
Copy Markdown
Collaborator Author

Done!

As for CSS modules, we can use them if we drop LESS support in Next.js. But that means we would have to precompile the Antd theme somehow before calling Next, which feels messy and complicated.

Copy link
Copy Markdown
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@benjie benjie merged commit 0c81e76 into graphile:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants