-
Notifications
You must be signed in to change notification settings - Fork 42
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
inlineKnockoutTemplates issues #81
Comments
Hmm, it sounds like you're using an old version of the Would updating to this version remove the need for you to get the actual contents as a JavaScript string?
Never ran into that, probably because I call |
I'm no longer working on that code base, so I have no way to follow up on any fixes. Closing until someone else takes the issue up |
I'm using the following pattern. It might be an antipattern, so I'll accept arguments agains this pattern.
So my requirejs tpl plugin loads the template into knockout as an externaltemplate, but it also returns the template string for use in the amd module.
Now, when this runs through the
inlineKnockoutTemplates
transform, the templates are appended to the body, the require statements are gone, and the arguments get removed.This causes a bit of a problem, which I have to work around like this:
This is obviously a bit annoying, so I'd like input on changing this pattern.
Another Issue I just noticed is that the knockout templates get appended to the body as the last items. After the main javascript bundle. This triggered an error in IE for me where the template wasn't in the dom yet when the script ran. Is there a way to inline the templates at an earlier point, before the main javascript bundle?
The text was updated successfully, but these errors were encountered: