But I have to import the handlebars.amd.js in my RequireJS config to make it works, or Handlebars will be undefined in the generated template file with handlebars.runtime.amd.js
Do you have any ideas? Tanks for the work ;)
edit: Made it working with the handlebars.runtime.amd.js this way:
I import handlebars.runtime.amd.js in my RequireJS config with the name handlebars.runtime and a vendor/handlebars.js as name handlebars. Into my file vendor/handlebars.js I just wrote:
define(['handlebars.runtime'], function (Handlebars) {
'use strict';
return Handlebars;
});
This is making the trick, I'll just leave it here if someone needs a similar solution. If you have a cleanier way to achieve this, let me know.
:thumbsup:
But I have to import the
handlebars.amd.js
in my RequireJS config to make it works, orHandlebars
will be undefined in the generated template file withhandlebars.runtime.amd.js
Do you have any ideas? Tanks for the work ;)
edit: Made it working with the
handlebars.runtime.amd.js
this way:I import
handlebars.runtime.amd.js
in my RequireJS config with the namehandlebars.runtime
and avendor/handlebars.js
as namehandlebars
. Into my filevendor/handlebars.js
I just wrote:This is making the trick, I'll just leave it here if someone needs a similar solution. If you have a cleanier way to achieve this, let me know.