yarn nuxt 0.9.0
v0.9.0

latest releases: 3.14.159, 3.14.0, 3.13.2...
7 years ago

Breaking Changes

The 0.9.0 is an important release, we can now define dynamic routes without the nuxt.config.js file, please read more in examples/custom-routes/

The router.routes object does not exist anymore, this gives a better readability for any Nuxt.js project without removing any features.

We also introduce a validate({ params, query }) method to validate the routes params/query before entering the the data method, if you return false, the error page will be displayed with a 404.

Also, we can now define children routes by creating a directory with the same name as the file, example:

-| pages/
---| parent/
-----| child.vue
---| parent.vue

And then, in your parent.vue component, you can add <nuxt-child></nuxt-child> to display the child component (when navigating to /parent/child)

Features

  • JavaScripts hooks can be defined in the transition property. To see the list of props and events: https://vuejs.org/v2/api/#transition
    transition can also be a function (to, from) { return 'fade' } so you can set a different transition depending of the route destination
  • Introduction <nuxt-link> which is exactly the same as <router-link> but in the future, will add lazy-loading and more 🔥

If you were using the class .router-link-active, please replace it to .nuxt-link-active, or if you want to keep the router-link-active class, update your nuxt.config.js like this:

module.exports = {
  router: {
    linkActiveClass: 'router-link-active'
  }
}

Improvements

  • You can import components without giving the .vue extension now (fixed #59)
  • In development mode, when the nuxt.config.js file changed with a syntax error, the server will not crash (fixed #60)
  • Upgrade to webpack 2.2.0-rc.0
  • build.babel options are given to the vue-loader as well. Now you can write JSX in your vue components, see https://gomix.com/#!/project/nuxt-hello-world-jsx

Bug fixes

  • Fix importing .js file with ES6 syntax in .vue files (Fix #63)
  • Use cross-env for setting NODE_ENV=production on Windows (#65)
  • Avoid the renderer error when nuxt.config.js change on nuxt (#66)

What's next?

Before launching the 1.0.0, we are working on:

  • 100% coverage with a lot of tests because it's really important for us to deliver a reliable framework
  • The ability to add middleware to your routes, useful for having routes that need the user to be authenticated first
  • config.build.publicPath, see #25
  • nuxt.renderStream and nuxt.renderRouteStream, see #26
  • Generate filenames with chunkName for avoid CDN caching
  • A complete documentation on nuxtjs.org
  • Real-life examples
  • Improvements and bug fixes

Don't miss a new nuxt release

NewReleases is sending notifications on new releases.