LoginSignup
2
0

More than 5 years have passed since last update.

windows版のvagrantでrails5+webpack使うとコンパイルができない問題

Posted at

状況

rails5下でwebpack-dev-server起動してjs類をインクリメンタルにコンパイルするというのをvagrant上でやろうとしたら、jsがコンパイルされない。
どうやらホストがwindowsの場合、共有フォルダを使うと、vboxsfがionotifyに対応しておらず、それを使用しているwebpack-dev-server変更を検知できない模様。

解決策

デフォルトのionotify使わずにpollオプションを使った。

config\webpacker.yml
development:
  # Reference: https://webpack.js.org/configuration/dev-server/
  dev_server:
....中略.....
    watch_options:
      aggregateTimeout: 300
      poll: 1000

参考

2
0
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
2
0