aktos-io / scada.js

Industrial distributed SCADA and MRP library for web, desktop and mobile
https://aktos.io
93 stars 26 forks source link

Watchify gives up on tracking dependencies for corrections on Pug dependencies #193

Closed ceremcem closed 2 years ago

ceremcem commented 4 years ago

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 with require "xyz" in .ls files) for further fixes.

Reproduction

  1. Place the following code in app.pug:
+iff('something')
+endif
  1. See Browserify compiles the app correctly.

  2. Comment out +endif

  3. See Browserify throws an error message

  4. Uncomment the +endif

  5. See Browserify builds successfully.

  6. Place the same code into a dependency (any file included in app.pug)

  7. Go to step #1

  8. 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.