You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having problems trying to get lasso-marko to work for our Koa server.
This is our current lasso setup.
If we run this file with node lasso-config.js it really works :)
However when we try to duplicate this with an identical browser.json file for the marko page, it fails - no script/dependency is inserted. We are pretty lost...
'use strict';varlasso=require('lasso');lasso.configure('./lasso-config.json');lasso.lassoPage({name: 'registration',dependencies: ["./public/registration.js"]},function(err,lassoPageResult){if(err){console.log(err);}console.log('lassoPageResult ',lassoPageResult);varheadHtml=lassoPageResult.getHeadHtml();// headHtml will contain something similar to the following:// <link rel="stylesheet" type="text/css" href="static/my-page-169ab5d9.css">varbodyHtml=lassoPageResult.getBodyHtml();// bodyHtml will contain something similar to the following:// <script type="text/javascript" src="static/my-page-2e3e9936.js"></script>});
Hi @jcc2303, you didn't share the code for your page templates but I suspect you missing the required Lasso.js tags for Marko. Are you including the <lasso-page>, <lasso-head> and <lasso-body> tags? Those tags do the work of injecting the required <script> and <link> tags into your rendered HTML. Please see: Using Lasso.js Taglib with Marko
If you are using those tags and are still seeing the problem then please let me know. I hope that helps.
Hi,
We are having problems trying to get lasso-marko to work for our Koa server.
This is our current lasso setup.
If we run this file with
node lasso-config.js
it really works :)However when we try to duplicate this with an identical
browser.json
file for the marko page, it fails - no script/dependency is inserted. We are pretty lost...Our marko rendering setup:
our lasso config
reference from server
In
/views/pages/registration
we have aregistration.marko
page template and aregistration.browser.json
file as follows:Our marko rendering logic
It renders the html but without the registration.js script injected. What are we missing or doing wrong?
Thanks :)
The text was updated successfully, but these errors were encountered: