Notice that in this case riot will internally transform all the export default
expressions to enable a better support for browsers that don’t support javascript modules yet.
You might prefer using data-src
instead of src
on your <script>
tags stop your browser prefetching automatically any riot script tag in order to avoid to load the same resources twice. Riot will automatically fetch and compile your tags via ajax.
The riot+compiler.js
bundle exposes the compileFromString
and inject
methods that combined together, can help you compiling the above component: