twig-html-loader
twig-html-loader copied to clipboard
Error then using async function and filters
Then I try to add async function, for example:
functions:{
getFileInfo:(value,...args)=>{
return new Promise((resolve,reject)=>{
setTimeout(()=>{
// get file info from DB
return resolve(JSON.stringify(require("./demo_data/file_data.js")))//info about file
},3000)
})//promise
},//getFileInfo
}
I got error:
NonErrorEmittedError: (Emitted value instead of an instance of Error) TwigException: You are using Twig.js in sync mode in combination with async extensions.