We are very happy to introduce Next.js 5.0 to the world. It’s available on npm effective immediately. To upgrade, run:
In addition to bumping Next.js, we upgrade the peer dependencies react and react-dom
Next.js is a toolkit for universal, server-rendered (or statically pre-rendered) React.js applications. Getting started developing an application of any size is as easy as executing next . ( Read more .)
With every new release we are committed to retaining backwards compatibility, offering simple upgrade paths and only making API changes when absolutely necessary. Next.js 5.0 is no exception.
Under the hood, however, Next.js has undergone a radical transformation to enable powerful new use cases and extensibility.
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.
We are very happy to introduce Next.js 5.0 to the world. It’s available on npm effective immediately. To upgrade, run:
Definition / Understanding
Many drop-in replacement implementations of React have emerged over time. Among them, some notable ones are [preact](https://preactjs.com/), nervjs and inferno. Other libraries focus on replacing the DOM renderer, like react-dom-lite, which is aiming to make a smaller React build by introducing some minor tradeoffs in browser compatibility. Universal Webpack support makes the process of incorporating these libraries as drop-in replacements even e
General
One of the fastest growing technologies in the JavaScript ecosystem is TypeScript. So much so, that it is becoming officially supported by Babel 7, which means it will naturally be supported by Next.js by just customizing your .babelrc. In the mean time, thanks to our new Universal Webpack support, you can already get full TypeScript support today! You can extend your webpack config like this: module.exports = {
webpack(config, options) {
c
General
Next.js leverages existing powerful tools like Webpack, Babel and Uglify, presented to the end-user as a remarkable simple interface: next (to develop), next build (to prepare for production) and next start (to serve) or next export to pre-render to static files. One of the early decisions we made was to provide very powerful extensibility points for how these tools are configured. We didn't just want ease of use, we wanted to enable flexibility
General
Now that webpack is used by Next.js for both client and server code, enabling source-maps in production builds is just one small adjustment to its configuration. In development source maps are automatically enabled, so we configure it differently for production: module.exports = {
webpack(config, { dev }) {
if (!dev) {
config.devtool = 'source-map';
}
return config;
},
};
We simply configure the devtool option differently w