v1.0.0-rc5
Pre-release
Pre-release
Improvements
- Route orders is handled with wildcard, see #1275
nuxt generate
won't sort the CSS class names by default (fix some issues with Semantic UI), see 533c8a9- Support Class Components in layouts & extended components (PR #1310 & 1342)
- Add better support for pug (PR #1361)
- We can now use
~/assets
in style tag in vue files. (2ff8b5a, #1241) - Prevent error with opencollective postinstall script (a0d888d)
- Improve extracted CSS long term caching by using
[contenthash]
(#1390, c9def71) - Webpack chunk namings and hash improved (No longer meaningless
0.nuxt.bundle
) (e510136) - Fix problem with nuxt-start
package.json
(#1378) - perf: Scope Hoisting now enabled for client bundles
- perf: improved js minification using ES6 aware babel-minify and exporting banners to an external LICENSES file. (673dfcd)
Features
- Add
process.static
(equalstrue
withnuxt generate
) to know if your app is running as a static website (you can useprocess.server && process.static
to know when the page are server rendered before being saved). - Add
isStatic
inside context - Store with modules now has
strict: true
by default in development mode to force Vuex best practices (see https://vuex.vuejs.org/en/strict.html)
Better SPA Experience
- You can run nuxt commands in spa mode using
--spa
(nuxt --spa
) - Introduce to
options.mode
innuxt.config.js
with 2 possible values:- universal (default): (server-side + client-side rendering)
- spa: (only client-side rendering)
- Resource Hints for SPA (7a9539e)
options.head
support for SPA (866e31d)options.loadingIndicator
for SPA loading splash with 10+ ready to use spinners out of the box.- Build & Deploy Apps using
nuxt build --spa
, the dist directory is automatically generated and ready to be deployed on pure static hostings like surge, github pages or now. - css sourcemaps can be disabled using
options.build.cssSourceMap
(Enabled on dev only by default)
See SPA example: https://spa.nuxtjs.org [source]
PostCSS
- Working PostCSS Everywhere (5d24294)
- Automatically detect and support
postcss.js
in projects. (f0ef419) - cssnext, postcss-import, postcss-url is the default preset, so you can enjoy latest css features and have import support.
- While old array style is supported, the new recommended usage is object style, so you can lazy require postcss plugins (adding in devDependencies only) and also customize default preset easier:
module.exports = {
build: {
postcss: {
plugins: {
'postcss-import': false, // Disable default postcss-import
'cssnext' : { /* provide some options */ },
'postcss-rtl': { } // Add your own postcss plugins
}
}
}
}