Bot releases are visible (Hide)
Published by Atinux almost 8 years ago
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
)
transition
property. To see the list of props and events: https://vuejs.org/v2/api/#transitiontransition
can also be a function (to, from) { return 'fade' }
so you can set a different transition depending of the route destination<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'
}
}
.vue
extension now (fixed #59)nuxt.config.js
file changed with a syntax error, the server will not crash (fixed #60)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
.js
file with ES6 syntax in .vue
files (Fix #63)NODE_ENV=production
on Windows (#65)nuxt.config.js
change on nuxt
(#66)Before launching the 1.0.0
, we are working on:
config.build.publicPath
, see #25nuxt.renderStream
and nuxt.renderRouteStream
, see #26Published by Atinux almost 8 years ago
Published by Atinux almost 8 years ago
error.vue
layout path with srcDir
(#54)Published by Atinux almost 8 years ago
srcDir
feature to npm (fix #53)Published by Atinux almost 8 years ago
srcDir
option allowing you to have your pages
directory and other source folder for Nuxt.js in a sub directory, see #44 for more details (credits to @cj)generate()
when generating +100,000 paths, calling them 500 by 500 to avoid out of memory
Published by Atinux almost 8 years ago
layouts/error.vue
which was not assigned to the right variable when existingPublished by Atinux almost 8 years ago
window.onNuxtReady
before importing the plugins so we can use this hook inside themPublished by Atinux almost 8 years ago
routeChanged
event for $nuxt
, you can use it like this in your plugins:if (process.BROWSER_BUILD) {
// set google-analytics script here...
// and then:
window.onNuxtReady((app) => {
app.$nuxt.$on('routeChanged', (to, from) => {
ga('set', 'page', to.fullPath)
ga('send', 'pageview')
})
})
}
Published by Atinux almost 8 years ago
pages/_app.vue
to layouts/app.vue
and pages/_error.vue
to layouts/error.vue
nuxt.build()
because new Nuxt(options)
is not launching anymore the build automatically.const Nuxt = require('Nuxt')
const nuxt = new Nuxt(options)
nuxt.build()
.then(() => {
app.use(nuxt.render)
})
nuxt.renderAndGetWindow(jsdom, url)
method to render the url and sent back the window
object, useful for test purposes (see examples/with-ava/)Published by Atinux almost 8 years ago
env
in the data context argumentindex
name, pages/foo/bar.vue will be foo-bar
)Published by Atinux almost 8 years ago
vue-router
to v2.1.0Published by Atinux almost 8 years ago
nuxt.render.bind(nuxt)
anymore to use nuxt.render
as a middleware (Issue #18)Published by Atinux almost 8 years ago
.nojekyll
file empty
Published by Atinux almost 8 years ago
nuxt generate
now adds a .nojekyll
file in the generated folder to tell Github Pages to not ignore the _nuxt
directory (see github pages docs about it)nuxt init
has been remove, use nuxt/starter insteadPublished by Atinux almost 8 years ago
pages/_error-debug.vue
has been removed, now only pages/_error.vue
should be definedContent-Length
header in the server when rendering the htmlPublished by Atinux almost 8 years ago
˜
, useful if you have others folders, see #16env
property in nuxt.config.js
, you can now define environment variables that will be shared across the components (client and server side), see #16window.onNuxtReady(callback)
is now a function, useful for attaching multiple functions to it, when is the app will be mounted, the callback will be called with the root application in the first argumentwindow.onNuxtReady(function (app) {
// app is the $root vm
})
It is useful for test purposes or when defining plugins to launch when the app is mounted.
Published by Atinux almost 8 years ago
Published by Atinux almost 8 years ago
js
and css
settings (let vue-loader
handle it)store.replaceState
once the app is instantiatedPublished by Atinux almost 8 years ago
process.BROWSER
to add special code for the client bundle, please use process.BROWSER_BUILD
now. Also, process.SERVER_BUILD
has been added too.~router
to import the vue-router
router created by nuxt.js (can be useful to use vuex-router-sync
for example.vue
to 2.1.2
vue-meta
to 0.5.2
glob-promise
and only use glob
insteadPS: working also on nuxt generate
, to generate modern static websites with html files generated => Nuxt.js apps could be hosted on Github Pages 🔥
Published by Atinux almost 8 years ago
glob-promise
to v2.0.0css-loader
to v0.26.0Check Nuxt.js dependencies on https://david-dm.org/nuxt/nuxt.js