Upgrading nuxt 0.9 to 0.10
Breaking0.9.9 → 0.10.7Breaking2New21Changed12Fixed9Other1
2 breaking changes.
- If your pages used a data method that read the page context, rename that method to asyncData.
- Static generation config now takes a list of dynamic routes instead of route params.
Requires Node.js >=4.3.0 <5.0.0 || >=5.10 from 0.10.0 (none stated before).
Adds babel-preset-vue-app ^1.2.0, compression ^1.6.2, friendly-errors-webpack-plugin ^1.6.1, html-webpack-plugin ^2.28.0, offline-plugin ^4.7.0, post-compile-webpack-plugin ^0.1.1, preload-webpack-plugin ^1.2.2, script-ext-html-webpack-plugin ^1.7.1, vue-ssr-html-stream ^2.2.0, vue-ssr-webpack-plugin ^3.0.0.
Drops babel-plugin-array-includes, babel-plugin-transform-async-to-generator, babel-plugin-transform-runtime, babel-preset-stage-2, extract-text-webpack-plugin, path-to-regexp.
Installs 889 packages in all (was 857).
Also installs babel-helper-vue-jsx-merge-props, babel-plugin-jsx-event-modifiers, babel-plugin-jsx-v-model, babel-plugin-jsx-vue-functional, babel-plugin-syntax-jsx, babel-plugin-transform-vue-jsx, babel-preset-env, babel-preset-vue, boolbase, caniuse-lite, compressible, cosmiconfig, css-select, css-what, deep-extend and 23 more.
No longer installs @babel/helper-string-parser, @babel/helper-validator-identifier, @babel/parser, @babel/types, @vue/compiler-sfc, babel-helper-bindify-decorators, babel-helper-explode-class, babel-plugin-syntax-async-generators, babel-plugin-syntax-class-properties, babel-plugin-syntax-decorators, babel-plugin-transform-async-generator-functions, babel-plugin-transform-class-properties, babel-plugin-transform-decorators, babel-preset-stage-3, csstype and 7 more.
Moves ansi-regex 2.1.1, 5.0.1, 6.5.0 → 2.1.1, 3.0.1, 5.0.1, 6.5.0, async 1.5.2, 2.6.4 → 2.6.4, browserslist 1.7.7 → 1.7.7, 3.2.8, chalk 1.1.3, 2.4.2, 4.1.2 → 1.1.3, 2.4.2, css-loader 0.26.4 → 0.28.11, debug 2.6.9 → 2.6.9, 3.2.7, file-loader 0.9.0 → 0.11.2, has-flag 1.0.0, 3.0.0, 4.0.0 → 1.0.0, 3.0.0, hash-sum 1.0.2, 2.0.0 → 1.0.2, is-fullwidth-code-point 1.0.0, 3.0.0 → 1.0.0, 2.0.0, 3.0.0, isarray 0.0.1, 1.0.0, 2.0.5 → 1.0.0, 2.0.5, mime-db 1.52.0 → 1.52.0, 1.54.0, negotiator 0.6.3 → 0.6.3, 0.6.4, path-to-regexp 0.1.13, 1.9.0 → 0.1.13, postcss 5.2.18, 6.0.23, 8.5.32 → 5.2.18, 6.0.23 and 10 more. Your build may pick other versions.
What you must change
data to asyncData, which receives the context and can be asynchronous.dataasyncDatagenerate.routeParams with generate.routes, an array of dynamic routes called by Nuxt.generate.routeParamsgenerate.routes