
2/5/2018
What this post added
Next.js 5 refactors the codebase to make Webpack work universally for both server and client code, passing an `isServer` property to the decorator function. This enables the use of Webpack loaders for CSS, LESS, SASS, SCSS, and CSS Modules by extending the `webpack` configuration in `next.config.js` or by using `next-plugins` like `next-css`. TypeScript support is also integrated by customizing `.babelrc` or using the `next-typescript` plugin with `ts-loader`. Support for React altlibs like Preact is improved via plugins like `@zeit/next-preact`. Production source maps can be enabled by configuring `config.devtool = 'source-map'` when not in development. The 'Zones' feature allows composing multiple Next.js applications by defining rules in a `rules.json` file and using `vercel alias` to connect them under a parent domain.