19
13

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 5 years have passed since last update.

【メモ】Vue CLI でホットリロードが効かない

Posted at

VueCLIからプロジェクトを作成し

毎回npm run serveして、止めてを繰り返してたのですが調べると
serveのコマンドであるvue-cli-service serveはホットリロード(保存したら自動的にロードされる)が搭載されていた模様

なぜかホットリロード効かなかったのですが、

vue.config.jswebpackのオプションを追加したらかかるようになりました

vue.config.js
module.exports = {
  configureWebpack: {
    devServer: {
      watchOptions: {
        poll: true
      }
    }
  }
}

19
13
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
19
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?