-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"goog is not defined" in production #17
Comments
Did you include twig.js's runtime code ( |
Hmm. I think this may somehow be related to the fact that I symlinked twig.js into my AppBundle's Resources\public\js directory. I was pulling in twig.js like this:
However, for some reason it doesn't compile in twig.js if I am using a symlink and I use a wildcard (*) to pull in JS files. Thanks for pointing me in the right direction. On a side note, is this the "appropriate" way to include Twig.js? I couldn't figure out how to load in the resource from the source bundle so I just symlinked it. |
@ajbdev See the closed How should twig.js be included? issue.
|
Just had the same problem: "goog is not defined" . Fixed by using the good twig.js file. (i was using the src-js/twig.js file) |
Just had the same problem too: To fix, I just added in composer.json: works perfect, thanks |
Same problem : "goog is not defined"
and i can see in my templates.js : |
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?
The text was updated successfully, but these errors were encountered: