If a Ractive.parse() error occurs in a Pug dependency, Watchify does not trigger Browserify when this dependency is fixed. Watchify only keeps tracking the main entry files (required with require "xyz" in .ls files) for further fixes.
Reproduction
Place the following code in app.pug:
+iff('something')
+endif
See Browserify compiles the app correctly.
Comment out +endif
See Browserify throws an error message
Uncomment the +endif
See Browserify builds successfully.
Place the same code into a dependency (any file included in app.pug)
Go to step #1
See Browserify does not track the offending file anymore for further fixes at step #5.
Workaround
Go save the parent .pug file and see Browserify retries to compile that dependency.
Description:
If a
Ractive.parse()
error occurs in a Pug dependency, Watchify does not trigger Browserify when this dependency is fixed. Watchify only keeps tracking the main entry files (required withrequire "xyz"
in.ls
files) for further fixes.Reproduction
app.pug
:See Browserify compiles the app correctly.
Comment out
+endif
See Browserify throws an error message
Uncomment the
+endif
See Browserify builds successfully.
Place the same code into a dependency (any file
include
d in app.pug)Go to step
#1
See Browserify does not track the offending file anymore for further fixes at step
#5
.Workaround
Go save the parent
.pug
file and see Browserify retries to compile that dependency.