I am using the bundle with assetic integration.
When I introduce a new filter/function to a template then when doing assetic:dump TwigJS produces an error indicating that a filter/function is missing and refuses to compile the template.
This way the template won't even reach the "runtime" phase when I can register the used filter/function.
UPDATE:
I did a bit of research and it seems that in order to define any compile time/runtime filters/functions they have to be already present in Twig to avoid the compilation error. Is this an intended behavior? It seems a bit illogical to me. Even if haven't used TwigJS for Single Page App I can imagine plenty of situation when you want some filters/functions in JS which don't belong to standard PHP Twig.
I am using the bundle with assetic integration.
When I introduce a new filter/function to a template then when doing
assetic:dumpTwigJS produces an error indicating that a filter/function is missing and refuses to compile the template.This way the template won't even reach the "runtime" phase when I can register the used filter/function.
UPDATE:
I did a bit of research and it seems that in order to define any compile time/runtime filters/functions they have to be already present in Twig to avoid the compilation error. Is this an intended behavior? It seems a bit illogical to me. Even if haven't used TwigJS for Single Page App I can imagine plenty of situation when you want some filters/functions in JS which don't belong to standard PHP Twig.