✋ Thanks a lot to all the contributors and people helping us to make Nuxt.js better! ✋
This should be the last release with a breaking change before the 1.0
! You can see our roadmap here.
Breaking changes
data
is nowasyncData
for pages components, it's notasyncData
which receives the context and can be asynchronous, this is to respect the vue.js methods. It also fix the mixins withdata
. If you used the context in yourdata
methods, please rename them toasyncData
starting from this release. See updated documentation.- Static Generated:
generate.routeParams
is replaced bygenerate.routes
which has to be an array of dynamics routes called by Nuxt, see updated documentation.
Features
- Nuxt.js use Vue 2.2.5 and its rendering feature for CSS, no more CSS extracted, only the strict minimum CSS is now included in every page server-rendered!
- Cache for bundle with hash name are now available, combined with the
build.publicPath
option, it's a perfect combo for hosting your.nuxt/dist/
files on any CDN! - Use the official babel-preset-vue-app for babel default configuration (suggestion by @cj in #271). You can now write JSX directly into your Vue components, see hello-world-jsx example.
- New option build.publicPath, useful to set CDN url for production deployment or changing the
/_nuxt/
path if you don't like it. - New option router.mode, let's you define the
vue-router
mode (default to'history'
) (@cj via #272) - Add
~middleware
alias - We can now specify a custom layout for the
layouts/error.vue
component, see #172 - The app template is now customisable! Read more on the app.html documentation.
nuxt build
accept now a-c
or--config-file
option now (@PierreRambaud via #392)- New option: generate.minify to customize html-minifier options.
- We can now import CSS files directly in
<script>
, making Nuxt.js compatible with more external libraries.
Improvements
nuxt.render
now always returns aPromise
, even in dev mode when the build is not ready yet- Cleaner build/error outputs for terminal (@cj via #274)
- Nuxt.js prefetch every code-splitted to improve the loading performance when navigating, you have nothing to do, simply upgrade and your app will be faster! (you can disable it via the
nuxt.config.js
withperformance.prefetch: false
) - We also added
gzip
support in production (you can disable it via thenuxt.config.js
with performance.gzip) store.replaceState(window.__NUXT__.state)
is now made before importing the plugin.import store from '~store'
in plugins (client-side) will have the store filled.- Add
duration
property intransition
Bug fixes
- When switching layout, the page component are created only once (fix #214)
extendRoutes
works with generate + windows paths (fix #275)- Middleware are called from error page and the layout is respected when redirected (fix #389)