LoginSignup
1

More than 5 years have passed since last update.

Nuxt.jsを起動した時にdev has been deprecated in build.extend(), please use isDevと出る

Last updated at Posted at 2018-01-17

dev has been deprecated in build.extend(), please use isDev と出る

n.png

ググると、v1.0.0のリリースノートでDeprecateになっている。

v1.0.0以前にstarter-templateからインストールしてバージョンを上げた場合、 nuxt.config.js を以下のように修正する必要がある。

  /*
  ** Run ESLint on save
  */
- extend (config, ctx) {
-    if (ctx.dev && ctx.isClient) {
+ extend (config, { isDev, isClient }) {
+   if (isDev && isClient) {
      config.module.rules.push({
        enforce: 'pre',
        test: /\.(js|vue)$/,
        loader: 'eslint-loader',
        exclude: /(node_modules)/
      })

参考: https://github.com/nuxt-community/starter-template/commit/a2d4038ef3ca1965cfce08d245b47936f305afd7

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
1