Howdy,
I've been using this package to develop a couple templates that are only loaded via javascript. Everything works great in development. Templates are loaded as follows:
In my base.twig.html....
{% javascripts
"@MyAppBundle/Resources/views/Profile/modal.profile.html.twig"
"@MyAppBundle/Resources/views/Signup/modal.signup.html.twig"
filter="twig_js,yui_js" %}
<script language="javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
However, when I go to production I dump out the assets and and attempt to load the page, I get:
Uncaught ReferenceError: goog is not defined
It seems like the templates aren't getting compiled correctly for production. My understanding is that Google's closure library should be compiled (with only the required features) into the template itself. This seems work during development, but is not happening when I dump the assets to the filesystem for production usage.
Any thoughts on what I could be doing wrong here?
Howdy,
I've been using this package to develop a couple templates that are only loaded via javascript. Everything works great in development. Templates are loaded as follows:
In my base.twig.html....
However, when I go to production I dump out the assets and and attempt to load the page, I get:
It seems like the templates aren't getting compiled correctly for production. My understanding is that Google's closure library should be compiled (with only the required features) into the template itself. This seems work during development, but is not happening when I dump the assets to the filesystem for production usage.
Any thoughts on what I could be doing wrong here?