Bot releases are hidden (Show)
Published by Atinux about 6 years ago
Your migration is mostly straightforward as Nuxt 2 does not makes breaking changes. So you can try your chance and simply upgrade to Nuxt 2 using yarn add nuxt@^2.0.0
or npm install nuxt@^2.0.0
😉
.nuxt
, node_modules
, yarn.lock
and package.lock.json
nuxt.config.js
, modules
and serverMiddleware
to use import/export
instead of require
package.json
, if so please upgrade them to match Nuxt used versions
npm install
or yarn install
npm outdated
or yarn outdated
and manually update any other dependency with care.nuxt/dist/client
instead of .nuxt/dist
build.extend
, make sure your changes are compatible with Webpack 4.Still Having problems? Make a bug report at CMTY or reach us using Discord
nuxt-edge
package at March. But we wanted to make sure that most of the plugins were updated and stable before releasing a stable version of Nuxt.jsbuild.publicPath
need to upload built content to .nuxt/dist/client
directory instead .nuxt/dist
.export/import
syntax in nuxt.config.js
, serverMiddleware
and modules
.postcss-preset-env
instead of postcss-cssnext
(notes) (PR #3291), config build.postcss.preset
is for postcss-preset-env options
css-loader
upgrade, use ~assets
instead of ~/assets
for alias in <url> CSS data type
, e.g., background: url("~assets/banner.svg")
(PR #3741)watchQuery
lets you observe query strings and execute component methods (asyncData, fetch, validate, layout etc) on change (3d49d8d2905796f063b171fdd935da721622fe05)nuxt.config.js
(PR #3766)loading: false
option to pages, see example, (PR #3629)actions.js
, mutations.js
, getters.js
and state.js
) along with index.js
(PR #3636)server
option in nuxt.config.js
to set HOST
and PORT
(PRs #3701)NUXT_HOST
, NUXT_PORT
environment variables (PR #3651)nuxt.config.js
(PR #3655)nuxt.config.js
(PR #3734)NUXT_ENV_
will be automatically included in process.env
(#3862)no-ssr
has been upgraded to vue-no-ssr 1.0.0
, it supports placeholderTag
render:context
hook (PR #3294)background-color
to background
in loadingIndicator
(PR #3656), so you can use an image or some gradient for your background in SPA mode!loadingIndicator
when using IE (PR #3779)watch
option to watch custom files to restart the Nuxt.js server (default: nuxt.config.js
and serverMiddleware
files) (PRs #3633 and #3718)app.html
template in nuxt.config.js
(PR #3678)store.registerModule
to work seamlessly with SSR (#3909)vendor
array isn't used anymore because of Webpack 4render.gzip
option. Use render.compressor
instead.Published by Atinux about 6 years ago
Published by Atinux about 6 years ago
Published by Atinux over 6 years ago
static.prefix
(PR #2755)render:route
hook (PR #2754)ssrContext
into createRouter
and createStore
(see PR #2831)Big thank you too all the contributors for these amazing pull requests 👏
Published by Atinux over 6 years ago
Published by Atinux over 6 years ago
Published by Atinux over 6 years ago
keep-alive
prop to <nuxt/>
and <nuxt-child/>
, see with-keep-alive example, be aware that it's still a WIP and it can have some side effects to your application.build. maxChunkSize
to limit chunks size for agressive code splitting (PR #2687).jsx
files (PR #2628, fix #131)options.ignore
option (https://github.com/nuxt/nuxt.js/commit/347fa3e9fd878f0aca19cf9e509ff555894f8f86)render.scp
(Support of external script, PR #2608), see also https://github.com/nuxt/nuxt.js/commit/95c85bba62d5fbc4a9128cb19e01b9ad85a76e74
path
property) (https://github.com/nuxt/nuxt.js/commit/d444f2a5b1d1ecbbb3804d4e8f0a1bbc5c9d8671)<noscript>
tags to the footer with head
(PR #2674)redirect
to external urls works with nuxt generate
now (fix #2570)~
, ~~
, @
and @@
) to postcss-import #2617 (fix #1453)error
undefined on plugins error for server-side (https://github.com/nuxt/nuxt.js/commit/00f98c150fe03b707bcc5949e66152a5b69dd234)watchQuery
on examples/routes-transitions (PR #2633)Published by Atinux almost 7 years ago
Published by Atinux almost 7 years ago
(1)
on any unwanted error with modules (Except nuxt dev
)script-src
safe inline (PR #2549) via render.csp
option in nuxt.config.js
nuxt-start
package.json with main package.json (PR #2556) (nuxt-start is still WIP)Published by Atinux almost 7 years ago
It's been a long run and we are really proud to announce the official 1.0 release. Thank you so much for your support and we are looking forward to hear your feedback ❤️
Medium article: https://medium.com/@nuxt_js/nuxt-js-1-0-is-out-bab1af459972
⚠️ Minimum Node.js version required for Nuxt.js is also increased to 8.0.0 (Current LTS). This allows notable security and performance improvements for both Nuxt and SSR rendering by using native async/awaits and making development easier. So don't forget to upgrade Node to the latest version in both server and your local environment ;)
We have a new internal hook system now, some modules can be broken with 1.0 if they were relying on this.nuxt.plugin()
, instead, they will have to use this.hook()
, see module hooks documentation.
We removed the internal extensions for .ts
, if you want to use TypeScript into Nuxt.js, we recommend you to check out our typescript example.
For the below depreciation, it will still work but you will get a warning to tell you to change your code to the new value.
For better bundling experience for server-side and client-side, we deprecated context.isClient
and context.isServer
in flavor of process.client
and process.server
. Since these variables comes from our webpack configuration, it will optimize your client-side and server-side bundles magically 💅
We also deprecated dev
property inside build.extend()
in flavour of isDev
.
-
in front of its filename (example: pages/-ignored.vue
) (PR #2417)route.meta
(array of matched page .meta
) into context, useful for middleware (see details)this.$router
and this.app
inside your store actions!body: true
, in your head.script[]
to move your scripts at the end of <body>
(see example)nuxt generate --no-build
: Useful for conditions when just dynamic routes are being changed. This makes incremental builds much faster.spa
: Respect mounted hook on first render (fix #1629)--version
& -v
flag to nuxt
binary (you can do npx nuxt -v
to know which version of nuxt.js you are using in your project) #1840ENV
variable into app.html
, corresponds to env
from your nuxt.config.js
redirect
), it also improves perfs!nuxt dev
experience with faster and more stable reloadsoptions.modulesDir
as Array.gitignore
#1860/index.html
exists when copying to 200.html #1937head.titleTemplate
with function is now working (fix #1886)inject
: https://github.com/nuxt/nuxt.js/issues/1695#issuecomment-335074850
src
in templates (fix #2008 via #2016)no-ssr
to v0.2.1 #2181Published by Atinux about 7 years ago
asyncData
in SPA modePublished by Atinux about 7 years ago
resourcesLoaded
plugin for Renderer #1586context.serverState
to context.nuxtState
#1600Published by Atinux about 7 years ago
universal
mode), equals to window.__NUXT__
, useful for plugins which are using beforeNuxtRender
hookprocess.env
to have nested keys (https://github.com/nuxt/nuxt.js/commit/20eb5a5eb08334355c745ad8c7f8eef4dc0ac695)spa
mode with head
property (https://github.com/nuxt/nuxt.js/commit/1fcf3e685ec0bee7079c984cdd0cfa6a80e8be2d)Published by Atinux about 7 years ago
export default {
actions: {
async getProfile({ commit }) {
const profile = await this.$axios.$get('user/profile')
// Also app context is available using `this.app`
}
}
}
[email protected]
, you can now use ~/assets/...
into your <style>
Published by Atinux about 7 years ago
<no-ssr>
component (from vue-no-ssr), it allows you to render component only for client-side, see example
process.mode
to let you know in which mode your are into your application ('universal'
or 'spa'
)loading.rtl
option (default false
) to set the direction of the progress bar from right to leftapp
and every vue instances, see example for more detailsreplaceState
after plugins calls, this way, plugins can update the store before hydratation on client-side (https://github.com/nuxt/nuxt.js/commit/8dca35821621aa28e977eda189049d594464662e)serverMiddleware
(459363beeafbf899dc13fa08e9a304da8a03ef79, #1274)context.hotReload
to context.isHMR
build.extend
can now return the new config (PR #1447, fix #1288)asyncData
with nested pages in production build (#1248)babe.presets
if build.babel.babelrc
is true
Published by Atinux about 7 years ago
nuxt generate
won't sort the CSS class names by default (fix some issues with Semantic UI), see https://github.com/nuxt/nuxt.js/commit/533c8a9fb66e105ae8175bf31bff4eede5d733e1
~/assets
in style tag in vue files. (2ff8b5aaf6e3ed6f34b2f33f8840dffb9b1a0a17, #1241)[contenthash]
(#1390, c9def711fa5e6e72b886d8932ac24dbb2f7fbb7f)0.nuxt.bundle
) (e510136a5ab0b1ec39c578bf0d75827e42b1e7f1)package.json
(#1378)process.static
(equals true
with nuxt generate
) to know if your app is running as a static website (you can use process.server && process.static
to know when the page are server rendered before being saved).isStatic
inside context
strict: true
by default in development mode to force Vuex best practices (see https://vuex.vuejs.org/en/strict.html)--spa
(nuxt --spa
)options.mode
in nuxt.config.js
with 2 possible values:
options.head
support for SPA (866e31d1a6d0b921d2d4bddffac094427e529f13)options.loadingIndicator
for SPA loading splash with 10+ ready to use spinners out of the box.nuxt build --spa
, the dist directory is automatically generated and ready to be deployed on pure static hostings like surge, github pages or now.options.build.cssSourceMap
(Enabled on dev only by default)See SPA example: https://spa.nuxtjs.org [source]
postcss.js
in projects. (f0ef41962d5b2305054ddbfdaa6fe43fc147dc85)module.exports = {
build: {
postcss: {
plugins: {
'postcss-import': false, // Disable default postcss-import
'cssnext' : { /* provide some options */ },
'postcss-rtl': { } // Add your own postcss plugins
}
}
}
}
Published by Atinux about 7 years ago
vue-meta
to build meta tags for spa
mode based on nuxt.config.js
(39f431efdf1d68f457d0bae2b345f7f27708e36b)asyncData
& fetch
calls on spa
mode with children (#1423)build.dll
to true
in nuxt.config.js
for beta testing and reporting any possible issues with this feature (don't forget to git ignore .cache/
)Published by Atinux about 7 years ago
file-loader
for videos, see PR #1224Published by Atinux about 7 years ago
⚠️ This is still in heavy development, the API will not change to 1.0
but you may except some bugs.
We are working hard on the documentation, please wait for the new documentation before creating new issues.
We are also working on updating the templates and examples.
npm install --save nuxt@next
~
, ~~
, @
, @@
, assets
and static
(~plugins
should be renamed to ~/plugins
for example)build.loaders
has been removed in nuxt.config.js
, use build.extend
insteadinjectAs
has been removed in plugins, you can inject your plugins by accessing app
(see example)process.BROWSER_BUILD
has been removed in flavour of process.browser
process.SERVER_BUILD
has been removed in flavour of process.server
~store
and ~router
aliases, use plugins to access router
and store
(see example)IE9
+ compatibleETAG
and HTTP2
headersmode: "spa"
to create SPA (WIP)-p
(port) and -H
(host) option for nuxt dev
and nuxt start
nuxtChildKey
, see https://github.com/nuxt/nuxt.js/pull/1022#issuecomment-313870004
generate.concurrency
(default: 500
)build.devMiddleware
to customise webpack-dev-middleware
optionsbuild.hotMiddleware
to customise webpack-hot-middleware
optionsbuild.extractCSS
option (default to false
)nuxtServerInit
has now access to context.redirect
& context.error
context
is now given to plugins when they are exporting a function
context.from
(only available on client-side when navigating)context.beforeNuxtRender(fn)
with async fn({ nuxtState, Components })
(only available on server-side)Published by Atinux over 7 years ago
redirect
in plugins contextthis.addPlugin()
now unshift the plugins to be executed first