S
S
Sergey Zolotarev2021-11-17 15:14:30
Yii
Sergey Zolotarev, 2021-11-17 15:14:30

How to add the contents of the "type" attribute to registerJsFile()?

Good afternoon!

How do I bind the type attribute with its content in registerJsFile (if I include a script file with Babel syntax) so that the script tag looks like this?

Required and generated by the Yii framework Script tag:

<script type="text/jsx" src="./lander.jsx"></script>


An example of using registerJsFile for a base:
$this->view->registerJsFile("./lander.jsx", ['position' => View::POS_END]);


Thank you in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question