+
95
-

回答

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>RequireJS Example</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
    <script>
        // RequireJS 配置
        requirejs.config({
            paths: {
                'sablejs/runtime': 'https://cdn.jsdelivr.net/npm/sablejs@1.0.8/runtime'
            }
        });

        // 加载模块
        require(['sablejs/runtime'], function(sablejs) {
            console.log('sablejs loaded');
            // 在这里使用 sablejs
        });
    </script>
</head>
<body>
    <h1>RequireJS Example</h1>
</body>
</html>

网友回复

我知道答案,我要回答