Releases: nuxt/nuxt
Releases · nuxt/nuxt
v0.10.7
Features
- Add
generate.interval
to wait X ms between every render onnuxt generate
(@jroxendal via #617)
Improvements
- Add
--config-file
option innuxt dev
mode (@alexmoreno via #592) - Add chunkNames on Webpack for code-splitted pages and layouts:
Bug fixes
v0.10.6
Features
- Introduction of
injectAs
property for the plugin. It let you inject your plugin in the root application and also in the context, see i18n example which now use vue-i18n. Also checkout the documentation about it. - Nuxt.js is now compatible with vue-class-component, see example.
- Offline usage (one step forward to PWA!) is now possible via an
offline
option in thenuxt.config.js
(thanks to @rohitpal99 via #372), it's actually a WIP, you can look at the offline example to learn more about it.
Improvements
- You now have access to
this
in thedata
hook 🔥 - Give
nuxt
instance as context (this
) tobuild.extend
method (@any35 via #488) - Add
store
parameter in validate method (@agoalofalife via #507) - Add
babel-preset-es2015
in dependencies to avoid error with some external libraries
v0.10.5
Features
- Nested Vuex modules are now possible via the file API (@rhwilr via #447), see the vuex-store-modules example
- Nuxt.js extracts
manifest.[hash].js
to bundle the webpack runtime code, improving the vendor bundle cache possibilities (see Webpack doc). The filename is customisable, see build.filenames.manifest.
v0.10.4
Bug fixes
- Give the layout via
window.__NUXT__.layout
, this avoids calling middleware on client-side before mounting the app - Fix host & port inverted on console.log (#443 (comment))
v0.10.3
v0.10.2
v0.10.1
Improvements
- Webpack finally build only once, thanks to @AndyHall for his hack webpack/watchpack#25 (comment)
- Nuxt.js now import
.scss
,.sass
,.less
and.styl
files (only the webpack loaders dependencies needs to be installed), useful for using external libraries
v0.10.0
✋ 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)
Examples
v0.9.9
v0.9.8
Features
- The middleware feature is out 🔥 ! Read more on the documentation.
You can check the example-auth0 repository to see a real-life example. Otherwise, you can check the i18n example or the middleware example.
- Wildcard route:
_.vue
will now create a route{ path: '/*', name: 'all' }
Improvements
~store
links now to the store file which exports thevuex
store instance, useful to require it in plugins to extend it, same for~router
. See documentation.- A progress bar is now displayed when building the application (thanks to progress-bar-webpack-plugin)
- No need to use a root div for the
<nuxt>
component (@sirlancelot via #229)
Bug fixes
- Fix regression from
v0.9.7
:data
was not called anymore when query changed, it's now fixed. - Fix bug: routes generated by file names were in the wrong order.