I'm getting the error message Variable "hearsay_require_js" does not exist when following the instructions:
If you need to do anything fancy with the configuration, you can do so manually by modifying the default configuration, and suppressing config output when initializing RequireJS
A trip into ./Twig/Extension/RequireJSExtension.php shows that the reason for that error is that unlike in the 1.0.0 branch the Twig global is now never actually created.
Adding:
public function getGlobals()
{
return array(
'require_js' => array(
'config' => $this->getHelper()->config(),
'src' => $this->getHelper()->src(),
),
);
}
to ./Twig/Extension/RequireJSExtension.php.
and:
public function config()
{
return $this->configurationBuilder->getConfiguration();
}
to ./Templating/Helper/RequireJSHelper.php
adds back in the functionality from the 1.0 branch.
I'm getting the error message
Variable "hearsay_require_js" does not exist
when following the instructions:A trip into
./Twig/Extension/RequireJSExtension.php
shows that the reason for that error is that unlike in the 1.0.0 branch the Twig global is now never actually created.Adding:
to
./Twig/Extension/RequireJSExtension.php
.and:
to
./Templating/Helper/RequireJSHelper.php
adds back in the functionality from the 1.0 branch.