I'm trying to import a js file as type module in CakePHP 2.10.22. You can do something like this
echo $this->Html->script('test', array('inline' => false, 'type' => 'module'));
but that results in the tag being like <script type="text/javascript" type="module">
I also tired
echo $this->Html->tag(
'script',
null,
array(
'type' => 'module',
'src' => '/test/js/objects/test.js'
)
);
But it does not put it inside of the head html tag.
Is there a way to add on or make a custom helper that will add it into the head?