Changelog History
Page 4
-
v2.6.2 Changes
April 21, 2019π Fixes
- cli : Apply
nuxt.config.js
changes and watch for all imported files (#5500) - cli : Fix problem for users that have
tsconfig.json
but do not use typescript (#5478) - cli : Show memory usage after build for
nuxt dev
(#5514) - server Fix bug with SPA mode with CSP enabled (#5474)
- vue-renderer : Use
modulepreload
for modern mode when using spa generate (#5489) - webpack : Suggest using official
@nuxtjs/style-resources
package (#5499) - π Custom
router.base
support for banner url and loading screen (#5470) (nuxt/loading-screen#8)
π Security Fixes
- π Prevent potential XSS vulnerabiliy when using
vuex-router-sync
(nuxt/devalue#8) (vuejs/vuex-router-sync#89)
π Thanks to our awesome contributors to this release
- Damian Stasik (@visualfanatic)
- Andreas Zoellner (@zoellner)
- Vasyl Boroviak (@koresar)
- cli : Apply
-
v2.6.1
April 04, 2019 -
v2.6.0 Changes
April 04, 2019Migration Guide
β¬οΈ This version is addressing most of the problems of 2.5 and is without any breaking changes. For most of the users, a normal version upgrade would be enough. However, reading this guide can help to have a smooth upgrade.
General Tips
- π¦ Using yarn as the package manager is more preferred as Nuxt is internally being tested against yarn
- π Before upgrade ensure to remove
yarn.lock
,package-lock.json
andnode_modules
- β¬οΈ After full install and testing, also consider upgrading other dependencies. The
yarn outdated
command can be used.
Missing App Dependencies
Because of how package managers (yarn, npm) work, a wrong version of a dependency from one of the other dependencies may be hoisted into
node_modules
. Nuxt is strict about this and provides instructions for dependency resolution so please follow it.π¦ The well-known problem is with
firebase
package that requires to manually installnode-fetch
dependency in your project.βͺ Reverting breaking changes
π We accidentially introduced a change that broke the prod build for many people who are using Nuxt programatically. This has been resolved through #5413. Sorry for the inconveniences!
Core-js
Since
core-js@2
andcore-js@3
are both supported from babel 7.4.0, Starting from 2.6 Nuxt supports both versions (#5411). It is highly advised to stick with 2 (default) unless having a special dependency that needs 3. (Instructions forcore-js@2
are not required but recommended)core-js@2
- yarn:
yarn add -D core-js@2 @babel/runtime-corejs2
- npm:
npm i -D core-js@2 @babel/runtime-corejs2
core-js@3
- yarn:
yarn add -D core-js@3 @babel/runtime-corejs3
- npm:
npm i -D core-js@3 @babel/runtime-corejs3
Edit
nuxt.config.js
:export default { build: { babel: { presets({ isServer }) { return [[ require.resolve('@nuxt/babel-preset-app'), // require.resolve('@nuxt/babel-preset-app-edge'), // For nuxt-edge users { buildTarget: isServer ? 'server' : 'client', corejs: { version: 3 } }] ] } } } }
Typescript
Nuxt 2.5 users may only require to add
ts-node
to thedependencies
β > Beta Testers : Replace
nuxt
bynuxt-edge
, and@nuxt/typescript
by@nuxt/typescript-edge
in the following instructions.π 1. Remove
nuxt-ts
dependency (2.4 users only)- yarn:
yarn remove nuxt-ts
- npm:
npm remove nuxt-ts
- Add
nuxt
andts-node
todependencies
:
- Add
- yarn:
yarn add nuxt ts-node
- npm:
npm i nuxt ts-node
- Add
@nuxt/typescript
todevDependencies
:
- Add
- yarn:
yarn add -D @nuxt/typescript
- npm:
npm i -D @nuxt/typescript
0οΈβ£ 4. Create an emptytsconfig.json
file. Nuxt will automatically generate it with defaults at first run, then you can edit it to fit your needs
π Features
- π feat(babel-preset-app): support specifying core-js version (#5411) (Xin Du (Clark)) (159123f)
- feat(cli): add internal _generate and _build options (#5434) (Pooya Parsa) (516aea3)
- feat(cli): add
--quiet
option tonuxt generate
command (#5357) (Franck Abgrall) (91f4eb0) - feat(typescript): detect typescript based on
tsconfig.json
(#5412) (Pooya Parsa) (6ffc5c5) - feat(vue-renderer): add csp meta tags (#5354) (James George) (b978a37)
π Fixes
- π fix: unexpected token export in importing babel runtime helper (#5401) (ryota yamamoto) (3b85dd9)
- π fix(core): call ready to prevent breaking changes (Pooya Parsa) (#5413) (001ba77)
- π fix(build): disable loading
babel.config.js
by default (#5365) (Xin Du (Clark)) (64fa424) - π fix(builder): await for renderer to load resources (#5341) (Pooya Parsa) (caf5198)
- π fix(cli): catch all possible errors thrown from proper-filelock (#5347) (Pim) (39bbe46)
- π fix(renderer): retry render if renderer is in loading or created state (#5417) (Pooya Parsa) (8b99695)
- π fix(vue-app): decode uri in
getlocation
(#5337) (Johan Roxendal) (77dcfe6) - π fix(vue-app): prevent mounting page twice on redirect (#5361) (noe132) (2d73e8a)
- π fix(vue-renderer): add the csp hash if
unsafe-inline
hasn't been specified (#5387) (Sam Bowler) (97db6a4) - π fix(types): add type definition for typescript.typeCheck (#5326) (Daniel Roe) (2c1444d)
π¨ Refactors
- π¨ refactor(typescript): only generate tsconfig.json if missing (#5356) (#5367) (Kevin Marrec) (9a3fc8a)
- π¨ refactor(vue-renderer): improve ready status error (#5339) (Pooya Parsa) (535327c)
- π¨ refactor(webpack): add ability to get webpack config class (#5378) (Damian Stasik) (abf7db1)
Examples
- π³ examples: add docker example (#5430) (Utkarsh Gupta) (3eec115)
- β‘οΈ examples(vue-apollo): update to @nuxtjs/apollo 4.x (#5345) (Dmitry Molotkov) (95f2a12)
- β‘οΈ examples(with-buefy): update example (#5348) (Dmitry Molotkov) (ce66a8c)
- π¦ examples(with-element-ui): fix package scripts (#5349) (Dmitry Molotkov) (10812e3)
Chore
- π chore(postcss): deprecate config support (#5419) (Alexander Lichter) (1bd4fb1)
- chore(readme): fix grammar (#5395) (Irvin Lin) (f8d3626)
β¬οΈ Dependency Upgrades
- loading-screen: use wss for https (nuxt/loading-screen#4)
- loading-screen: fallback to fetch if ws fails (nuxt/loading-screen#6)
- node-proper-lockfile: fix mtime precision on some filesystems (#β88) (f266158)
-
v2.5.1 Changes
March 21, 2019π Bug Fixes
- π fix: revert to corejs@2 (#5317) (Pooya Parsa) (20836d9)
- π fix: remove consola.debug for hooks (#5318) (Thomas Reichling) (9ff01f9)
- π fix: apply default lock options before setting lock (#5320) (Pim) (7c24280)
- π fix(ts): wrong export used in render.d.ts (#5309) (Romain Lanz) (e67b298)
- examples: upgrade and fix typescript configuration files (#5310) (Romain Lanz) (7100a2c)
- chore: unsupport nuxt-legacy (pooya parsa) (797a4ce)
-
v2.5.0 Changes
March 21, 2019π± 15,000 line changes with 230 squashed commits by more than 30 contributors made this version possible! β€οΈ
What's new?
Typescript DX
π No longer needed to install
nuxt-ts
for typescript support. Nuxt.js officially supports TS by installing@nuxt/typescript
. Please see #5079 for reasons behind such migration.Babel
π» Babel 7.4, Core-js v3, and
Object.assign
polyfill for better browser support.Stability
π More than 30 fixes, refactors and performance improvements.
π» Open in Browser
π» Use
nuxt dev -o
to instantly open project in the browser and enjoy a cool loading screen:.nuxtignore
π Before v2.5, you were able to ignore files through an ignore prefix. As using the prefix over and over, ignoring files (and implementing custom structures) was a bit tedious on the long run. We came up with something more sophisticated: A
.nuxtignore
file. Following the same specs as a.eslintignore
or a.gitignore
file, you can now define what files or folders to ignore through a.nuxtignore
file in your project root.π§ Examples and more info in the .nuxtignore docs
[IMPORTANT] Migration Guide
π Lock Files
π For a clean upgrade, please remove
yarn.lock
/package-lock.json
file from your project before upgrade.Programmatic API / Middleware
If not already done, please explicitly call
nuxt.ready()
afternew Nuxt()
.nuxt.ready()
was alwaysasync
, but not awaiting the function call has now a severe impact.const nuxt = new Nuxt(config)++ await nuxt.ready()
TypeScript
Please replace
nuxt-ts
dependency and usenuxt
+@nuxt/typescript
. (Alsonuxt-ts-edge
tonuxt-edge
+@nuxt/typescript-edge
for edge users){-- "nuxt-ts": "2.4.2"++ "@nuxt/typescript": "2.5.0"++ "nuxt": "2.5.0"}
π 1. Configuration API to customize/disable type checking has been moved from
build.useForkTsChecker
tobuild.typescript.typeCheck
. Please see #5079 for more details.build: {-- useForkTsChecker: false // or ForkTsChecker options++ typescript : {++ typeCheck: false // or ForkTsChecker options++ }}
π Features
- 0οΈβ£ feat(babel): include
es6.object.assign
by default (Clark Du) (52fe145) - π feat(cli): lock project during build or generate (#4985) (Pim) (4e51723)
- π» feat(cli): option to open the project in the browser (#4930) (Ricardo Gobbo de Souza) (4c7bd9c)
- π feat(generate): return non-zero code or page error (fixes #4991) (#5195) (Jarek Lipski) (c6565c9)
- π feat(module): support src as a function in addModule (#4956) (Ricardo Gobbo de Souza) (1e9eb4b)
- π feat: support
.nuxtignore
(#4647) (Xin Du (Clark)) (59be77a) - π feat: support
devModules
option (#5102) (Jonas Galvez) (e87711c) - π§ feat(ts): nuxt configuration typedefs (#4854) (Kevin Marrec) (92f81e0)
- feat(vue-app): universal fetch (#5028) (Pooya Parsa) (2015140)
- feat(vue-renderer): improvements (#4722) (Pooya Parsa) (2929716)
- feat(vue-renderer): use async fs (#5186) (Pooya Parsa) (d07aefa)
- π feat(ts): better DX for typescript support (#5079) (Kevin Marrec) (920f444)
- feat: loading screen (#5251) (SΓ©bastien Chopin, Pooya Parsa) (ef41e20)
- π feat: support core-js 3 (#5291) (Xin Du (Clark)) (d094c4a)
π Fixes
- π fix(builder, vue-app): order of plugin execution based on order in array (#5163) (Dmitry Molotkov) (a867dbd)
- π fix: correct public path in generation and start (#5202) (Xin Du (Clark)) (648062c)
- π fix: default for-exit to false to prevent dev exit (pooya parsa) (a347ef9)
- π fix: disable "analyze" for nuxt generate (#4975) (Alexander Lichter) (574a2eb)
- π fix: disable parallel build when extractCSS is enabled (Clark Du) (aad46ed)
- π fix: extra properties in templateFiles (#4925) (Xin Du (Clark)) (ca19124)
- π fix: fix non standard esm modifications (pooya parsa) (fb87a55)
- π fix: generate failure (#5007) (Andrey Shertsinger) (bcd672f)
- π fix: keep-alive component data should not be updated (#5188) (Xin Du (Clark)) (1ea8661)
- π fix: not send Server-Timing header if no timing info (Clark Du) (d9a0b5f)
- π fix(postcss): default to preset-env and cssnano last (#5215) (Alexander Lichter) (adf423a)
- π fix: publicPath is not reactive in dev restarting (#5227) (Xin Du (Clark)) (1fb7538)
- π fix: refactor file watchers (chokidar/linux workaround) (#4950) (Pim) (5ec5932)
- π fix: remove cache-loader for external resources (#4915) (Xin Du (Clark)) (0223e56)
- π fix: respect namespaced in store module (#5189) (Xin Du (Clark)) (9e1ef88)
- π fix: revert templatFiles name (#4924) (Xin Du (Clark)) (f70645e)
- π fix: trailing comma in tsconfig (#5061) (Sergey Vikulov) (1fb44d9)
- π fix(ts): deprecate
isClient
,isServer
,isStatic
(#5211) (Daniel Hritzkiv) (29c3c42) - π fix(types): reflect chainlable NuxtLoading methods (#5104) (MatjaΕΎ LipuΕ‘) (66273f4)
- π fix: Unexpected token .... Expected a property name in Safari (Clark Du) (eef7f69)
- π fix(vua-app): clone mount error to prevent mutating read-only error object (#5214) (Alexander Lichter) (37006f6)
- π fix(vue-app): avoid css chunk error (#5173) (Yutaka Sasaki) (41028a4)
- π fix(webpack): clone
config.entry
(fixes #4849) (#5236) (Julien Dargelos) (8216765) - π fix: disable extract-css-chunks-webpack-plugin in dev mode (#4888) (Xin Du (Clark)) (928a230)
- π fix(server): handle decodeURI error (#5243) (phof) (5b7f6d7)
- π fix: correct socket address in use error message (Clark Du) (2eb1965)
- π fix(utils): relax lock settings (#5280) (Pim) (65a431d)
- π fix(vue-app): multiple named views cause invalid syntax (#5262) (Michael Leaney) (d03a61b)
- π fix(webpack): loaders in extend config is broken (#5292) (Xin Du (Clark)) (0eb5ed9)
- π fix(vue-app): duplicated router.base when using context.redirect(object) (#5290) (Nianyong) (cf02e82)
- π fix(vue-app): decode router base to support unicode characters (#5297) (Alexander Lichter) (3ac01df)
π Performance Improvements
- perf: await routeData promises in parallel (#5027) (Alexander Lichter) (0826d7e)
- perf(core): skip esm for node_modules and non .js files (#5220) (Pooya Parsa) (aabb1f6)
- π± perf(webpack): use
futureEmitAssets
(#5003) (Alexander Lichter) (3997d50) - perf(ts): transpileOnly when using
nuxt-ts start
(#4906) (Kevin Marrec) (17cc12f)
Examples
- π¦ examples(jest-puppeteer): fix package .json (#4997) (Andrew Cravenho) (dfc8dd5)
- examples: improve vuex store example (#5017) (Alexander Lichter) (a9511e5)
- examples(pug): fix example by adding plain-pug-loader (#5223) (Paul Geisler) (320a46f)
- examples(vuex-store): change to module store (#4923) (Alexander Lichter) (be41ae1)
- examples: add pug-stylus-coffee (#4927) (chiboreache) (6d05969)
- examples: add tsx example (#4855) (andoshin11) (5101dc6)
- β examples: fix jest test dependencies (#5155) (Dmitry Molotkov) (1c3761a)
- examples: fix links to vue-meta repo (#5018) (Pim) (06f4762)
- β examples: rebase on latest stable nuxt version (#4874) (Alexander Lichter) (47898fb)
- examples: zero-downtime pm2 typescript example (#4907) (Dmytro) (1fb9af3)
- examples: fix dynamic components example (#5294) (Dmitry Molotkov) (d9db45c)
π¨ Refactors
- π¨ refactor: generate routes and template files in builder (#4883) (Xin Du (Clark)) (4c5a59e)
- π¨ refactor: improve modern middleware and spa modern rendering (#5037) (Xin Du (Clark)) (05299d6)
- π¨ refactor: isModernBrowser return boolean for avoiding duplicate call (Clark Du) (c6d8e8f)
- π¨ refactor: not detect modern browser if modern mode is disabled (Clark Du) (2b4d79c)
- π¨ refactor: remove builder coupling from server (#5157) (Pooya Parsa) (13cb0f7)
- π¨ refactor: remove unnecessary onEmit in old webpack (Clark Du) (eac6d02)
- π¨ refactor: some small stuff (#4979) (Alexander Lichter) (69dfd84)
- π¨ refactor: fix typos (#4922) (Alexander Lichter) (569b6aa)
- π¨ refactor: unify context in webpack module (#5054) (Xin Du (Clark)) (9860eb6)
- π¨ refactor: use spread syntax for plugin push (#4976) (Alexander Lichter) (31cb187)
- π¨ refactor: fallback to babel-preset-env defualt targets when buildTarget is not specified (Clark Du) (176641f)
- π¨ refactor(ts): add warning for nuxt-ts deprecation (#5301) (Kevin Marrec) (a11afd4)
Chore
- π chore(babel-preset): create readme with basic docs (#5127) (HG) (04cdd60)
- chore: don`t ignore .nuxtignore (#5169) (Dmitry Molotkov) (39c9ab5)
- π chore: enable yarn.lock maintenance (#5063) (Xin Du (Clark)) (17b53eb)
- π chore(vue-app): suppress deprecated warning for classic vuex in prod (#5137) (Shingo Sato) (f39205a)
β Tests
- β test: add await for promisable expect (Clark Du) (fabf1c0)
- β test: add chrome detector (#4984) (Xin Du (Clark)) (855705b)
- β test: add describe.posix and win (Clark Du) (e9ba2f9)
- π test: fix macos e2e tests (Pooya Parsa) (2c763df)
- β test: improve nuxt-loading component tests (#5005) (Pim) (75a7454)
- β test: mock enquirer in typescript tests (#5025) (Pim) (ad6a8cd)
- β test: skip reqest in dev test for now (Clark Du) (3e67879)
- β test: try to fix unhandled request (Clark Du) (2f2baac)
- β test: turn off cli dev test (Clark Du) (5c053f5)
- β test: unit tests for generator (#4857) (Xin Du (Clark)) (e22a282)
- β test: unit tests for @nuxt/util (#4880) (Xin Du (Clark)) (96bab9f)
- β test: unit tests for server module (#5154) (Xin Du (Clark)) (cc573a4)
- β‘οΈ test: update cli snapshot (Clark Du) (3dd1a28)
- β test: unhandled open handles (Clark Du) (858c9ee)
- β test: change cli.test to be more accurate (#4957) (Xin Du (Clark)) (68f6880)
- β test: use puppeteer-core (#4929) (Pooya Parsa) (940a36f)
- β test: fix e2e test by downloading chromium (#5254) (Pooya Parsa) (2561b68)
- β test: fail tests in case of unhandled errors (#5255) (Pooya Parsa) (d6b505a)