Shopify / sprockets-commoner

Use Babel in Sprockets to compile JavaScript modules for the browser
MIT License
182 stars 22 forks source link

sprockets-commoner does not notice file system changes in conjunction with babel-plugin-import-glob #66

Open mindnektar opened 7 years ago

mindnektar commented 7 years ago

Hiya,

I'm using babel-plugin-import-glob to import several files from a directory at once, allowing myself more flexibility and reducing monkey tasks with files that are regularly added, removed and iterated over in my application. Unfortunately, sprockets-commoner does not trigger a recompile when a file is added or removed in the respective directory. I found a way to trigger it manually by editing the .babelrc file (simply adding a whitespace will do the job), but this is hardly ideal.

I'm wondering if there's a way to tell sprockets-commoner to recompile when there are changes in certain directories, or maybe there's another way to solve this problem that I can't think of. Thanks for any input!