requirejs data-main vs require loading

时间:2017-03-02 10:15:59

标签: javascript requirejs require

index.html 文件中此片段的区别是什么?

<script src="lib/requirejs/require.js"></script>

<script>
    require(['myModule/require']);
</script>

<script data-main="myModule/require" src="lib/requirejs/require.js">/script>
<script src="myModule/require.js"></script>

0 个答案:

没有答案