sleexyz / dir-loader

Dynamically require a directory in Webpack. Use Webpack as a CMS!
13 stars 5 forks source link

Respond better to filesystem changes (not file changes) #12

Open sleexyz opened 9 years ago

sleexyz commented 9 years ago

Hot reloading currently works as intended if the contents of a required file changes.

However, webpack fails to detect changes to the filesystem (e.g. creation of a new file, deletion of a directory).

Currently, webpack has to be restarted on a filesystem change.

Implementing hot-reloading for filesystem changes is the best solution, though also non-trivial. This would entail propagating filesystem changes dynamically to the application structure.

An easier solution is to get our development server to watch the filesystem and recompile; i.e. refresh-wise updating.

sleexyz commented 9 years ago

TODO: check if require.context responds to filesystem changes...

TODO: check if addContextDependency actually works

GeorgeTaveras1231 commented 7 years ago

I implemented this and addContextDependency does work.