#179·ReLaXed

Load JSON and listen to changes?

Author: frankandrobotCreated Apr 2, 2020Updated Apr 3, 2020
Labelsquestion

I create a PUG that loads a JSON file. The problem is that relaxedjs does not update when I make changes to this file.

Here's the PUG that loads a JSON file:

-
  const fs = require('fs');
  const data = JSON.parse(fs.readFileSync("./my.json"));
 
section
   p  #{data.foo} 

when I make changes to my.json, the console reports No process defined for file /my.json. and does NOT rebuild the document.