Bot releases are hidden (Show)
Published by Atinux over 7 years ago
nuxt.build()
is now ran automatically on development modebuild.buildNamespace
has been renamed to buildDir
nuxt.renderAndGetWindow
)nuxt generate
, you can now give a payload
to avoid multiple API call, see this example to see how to use it.context.hotReload
(boolean) has been added to know when middleware or page hooks are being called from the hot reload or not (only in development) (fix #812)window.onNuxtReady
has been fixed (fix #829)dev
is now equal to false
when process.env.NODE_ENV === 'production'
Published by Atinux over 7 years ago
payload
(PR #768 by @jroxendal)build.buildNamespace
to manage multiple apps into the same folder (PR #776 by @motia)Published by Atinux over 7 years ago
generate.interval
to wait X ms between every render on nuxt generate
(@jroxendal via #617)--config-file
option in nuxt dev
mode (@alexmoreno via #592)dist
folder when using nuxt generate
with publicPath
being an URL (fix #612)Published by Atinux over 7 years ago
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.offline
option in the nuxt.config.js
(thanks to @rohitpal99 via #372), it's actually a WIP, you can look at the offline example to learn more about it.this
in the data
hook 🔥nuxt
instance as context (this
) to build.extend
method (@any35 via #488)store
parameter in validate method (@agoalofalife via #507)babel-preset-es2015
in dependencies to avoid error with some external librariesPublished by Atinux over 7 years ago
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.Published by Atinux over 7 years ago
window.__NUXT__.layout
, this avoids calling middleware on client-side before mounting the appPublished by Atinux over 7 years ago
nuxt.config.js
:module.exports = {
watchers: {
chokidar: {
usePolling: true
},
webpack: {
aggregateTimeout: 1000,
poll: 1000
}
}
}
Published by Atinux over 7 years ago
middleware
and store
with chokidar to avoid restarting the app when these folders are created during development.Published by Atinux over 7 years ago
.scss
, .sass
, .less
and .styl
files (only the webpack loaders dependencies needs to be installed), useful for using external librariesPublished by Atinux over 7 years ago
✋ 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.
data
is now asyncData
for pages components, it's not asyncData
which receives the context and can be asynchronous, this is to respect the vue.js methods. It also fix the mixins with data
. If you used the context in your data
methods, please rename them to asyncData
starting from this release. See updated documentation.generate.routeParams
is replaced by generate.routes
which has to be an array of dynamics routes called by Nuxt, see updated documentation.build.publicPath
option, it's a perfect combo for hosting your .nuxt/dist/
files on any CDN!/_nuxt/
path if you don't like it.vue-router
mode (default to 'history'
) (@cj via #272)~middleware
aliaslayouts/error.vue
component, see #172nuxt build
accept now a -c
or --config-file
option now (@PierreRambaud via #392)<script>
, making Nuxt.js compatible with more external libraries.nuxt.render
now always returns a Promise
, even in dev mode when the build is not ready yetnuxt.config.js
with performance.prefetch: false
)gzip
support in production (you can disable it via the nuxt.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.duration
property in transition
extendRoutes
works with generate + windows paths (fix #275)Published by Atinux over 7 years ago
v0.9.8
of routes order (#235)Published by Atinux over 7 years ago
You can check the example-auth0 repository to see a real-life example. Otherwise, you can check the i18n example or the middleware example.
_.vue
will now create a route { path: '/*', name: 'all' }
~store
links now to the store file which exports the vuex
store instance, useful to require it in plugins to extend it, same for ~router
. See documentation.<nuxt>
component (@sirlancelot via #229)v0.9.7
: data
was not called anymore when query changed, it's now fixed.Published by Atinux over 7 years ago
--analyze
(or -a
) option to nuxt build
, this will launch the bundle analyzer to let you see how to improve the size of your bundle. You can also use the build.analyze
option, see documentation.extendRoutes
property in the nuxt.config.js
file, see documentation.scrollBehavior
of vue-router via nuxt.config.js
, see documentation.nuxt <command>
does not spawn a process anymore, this facilitates the communication between the processes (@yuchonghua via #147)nuxt build
and nuxt generate
now exit with the status code 1 when the webpack build fail (fix #125)data
and fetch
to avoid recursive JSON error (fix #134)nuxt.render
sends back a promise to know when the page has been rendered (via #157)cross-spawn
dependencyv2.2.0
v2.1.10
and vue-router to v2.1.3
error()
and going back to another page (fix #96)data
and fetch
methods are not called anymore on hashchangePublished by Atinux almost 8 years ago
Shoutout to @Granipouss for this great feature!
{ isJSON: true }
option for serialize-javascript, which improves the performance of server-side rendering and force the component data to be plain object (better security)enterToClass
and leaveToClass
has been added in the transition
optionsnuxt.config.js
- #34 (comment)
v2.1.8
v2.2.0-rc5
, fix #98Published by Atinux almost 8 years ago
You can use async/await in your components, the best use case is the asynchronous data
method.
Example: pages/posts/_id.vue
<template>
<div>
<h1>{{ post.title }}</h1>
<pre>{{ post.body }}</pre>
</div>
</template>
<script>
import axios from 'axios'
export default {
async data ({ params }) {
// We can now use ES7 async/await
let { data } = await axios.get(`https://jsonplaceholder.typicode.com/posts/${params.id}`)
return { post: data }
}
}
</script>
See the updated documentation.
Add extend(webpackConfig, { dev, isClient, isServer })
option in the build
configuration. This option let you extend the webpack configuration for your application, this is for advanced users.
Example: nuxt.config.js
module.exports = {
build: {
extend (config, { dev, isClient }) {
// config is the webpack config
// dev is a boolean, equals false when `nuxt build`
// isClient is a boolean, let you know when you extend
// the config for the client bundle or the server bundle
config.devtool = (dev ? 'eval-source-map' : false)
}
}
Add scrollToTop: true/false
option in page component (default: false
), this option, when set to true will force the router to scroll to the top of the page (used for children routes).
babel-polyfill
but directly the required polyfillsPublished by Atinux almost 8 years ago
Published by Atinux almost 8 years ago
🎄 Merry Christmas! 🎄
This release should be the last one with breaking a change
Nuxt.js let you now define custom layout for specific page now, to see it in action, please take a look at the our demonstration video.
<nuxt-container>
component does not exist anymore (you can simply use a <div>
to wrap your layout template)layouts/default.vue
instead of layouts/app.vue
layouts/default.vue
layout
propertyThe default layout of Nuxt.js is:
<template>
<nuxt/>
</template>
Please take a look at the updated documentation.
More tests has been added to cover the bug fixes and also the layout feature.
autoprefixer
to v6.6.0
debug
to v2.5.1
lodash
to v4.17.3
vue
to v2.1.7
webpack
to v2.2.0-rc.2
webpack-hot-middleware
to v2.14.0
Published by Atinux almost 8 years ago
index.vue
, the parameter will be optional:pages/
--| users/
-----| _id.vue
Will create the route /users/:id?
.
nuxt.renderAndGetWindow(url)
does not need jsdom
as the first argument anymore, it will try to require it automatically (renderAndGetWindow is made to faciliate the tests with Nuxt.js)nuxt generate
minified HTML which was not working because of the removeComments: true
optionnuxt generate
on validate({ query, params })
method -> not server-render it when not validdata
methodvalidate()
call on children routesPublished by Atinux almost 8 years ago
2.1.1
& Vue 2.1.6
)preserveWhitespace: false
in vue-loader
configuration to avoid SSR mismatch errordata()
when staying in the same view but the query changed