The documentation of ui template has an example of external JS:
<script src="https://cdn.babylonjs.com/babylon.js"></script>
I would like to include a local file resource, so I modified settings.js
to include
module.exports = {
httpStatic: '/opt/robotapp/static/',
httpStaticRoot: '/static/',
}
Then I can use:
<script src="/static/test.js"></script>
Two questions:
- Is this the right approach or is there a better way?
- When using ES6 syntax I need to use
type=module
in the script tag?