16
6

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.

babelのwatch機能がdockerコンテナ上で動かない

Last updated at Posted at 2017-12-27

経緯

  • トランスパイル用のdockerコンテナをチームで共有したい
  • babel単体(モジュールバンドラ無し)

事象

  • jsファイルをdockerコンテナ上にマウント
  • dockerコンテナ上でトランスパイル
package.json
"scripts": {
 "build": "babel ./hoge/js --watch --out-dir ./hoge/output"
}
  • 何故か『watch』機能(変更検知 ⇒ 再トランスパイル)が動作しない

解決

dockerfileに以下を追加

Dockerfile
ENV CHOKIDAR_USEPOLLING=true

原因(?)

その他

  • 今のご時世でbabelが単体利用されるシーンってどんな時なんだろうか・・・

 
 
以上、覚書レベルの投稿でした。

16
6
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
16
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?