We are excited today to introduce Next.js 9.2, featuring:
All of these benefits are non-breaking and fully backwards compatible. All you need to do to update is run:
Next.js 5 introduced support for importing CSS through a custom plugin called next-css which extended the behavior of Next.js.
Over time we got consistent feedback from companies and users of Next.js, mentioning that they end up adding next-css to their application often.
Furthermore, next-css had a few missing constraints when importing CSS. For example, you could import a CSS file in every file of the project, however this imported CSS file would be global for the whole application.
In order to improve developer experience and solve these inconsistencies, we started working on…
This is an excerpt. The full article is published by Next.js Blog.
Answers to common questions regarding this article's topic, architecture, and practical applications.
This new behavior is fully backwards compatible. Upgrading to the latest version of Next.js is all you need to do to leverage this performance improvement.
General
We are excited today to introduce Next.js 9.2, featuring:
How It Works
Next.js 5 introduced support for importing CSS through a custom plugin called next-css which extended the behavior of Next.js. Over time we got consistent feedback from companies and users of Next.js, mentioning that they end up adding next-css to their application often. Furthermore, next-css had a few missing constraints when importing CSS. For example, you could import a CSS file in every file of the project, however this imported CSS file wou
General
The new chunking behavior not only reduces your overall and initial-load size, but also successive client-side navigations. Barnebys® saw a 87% reduction in the amount of JavaScript loaded after six (6) page navigations:
General
Next.js now supports CSS Modules using the [name].module.css file naming convention. Unlike the support previously available in Next.js 5 using next-css, global CSS and CSS modules can now coexist — next-css required all .css files in your application be handled as global or local, but not both. CSS Modules locally scope CSS by automatically creating unique class names. This allows you to use the same CSS class name in different files without wor