6
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Nuxt.js】mode option is deprecated. You can safely remove it from nuxt.config が出たときの対処法

Last updated at Posted at 2021-04-08

Nuxt.jsのv2.15.4にアップデートしたときに出たエラーです。

versionアップしてyarn devしたら次のようなメッセージーが出てきました。

WARN mode option is deprecated. You can safely remove it from nuxt.config

調べてみるとNuxtの公式に書かれていました。

v2.14.5から変更されたようですね。

nuxt.config.jsonからmodeオプションを記述するのが非推奨になったようです。

nuxt.config.js
mode: 'universal'

今後は変わりにssrを使用してくださいとのことです。

SSRの場合はこのように変更

- mode: 'universal'
+ ssr: 'true'

SPAの場合はこのように変更

- mode: 'spa'
+ ssr: 'false'

SSGにする場合はこのようにします。

nuxt.config.js
ssr: 'true',
target: 'static

以上、古いバージョンからアップデートするときの注意点でした。

6
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?