Skip to content

"goog is not defined" in production #17

Description

@ajbdev

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions