
let initialized = false
let loading = false
async function init() {
    // eruda.init({
    //     useShadowDom: false,
    //     defaults: {
    //         theme: 'Material Oceanic'
    //     }
    // })
    // eruda.add(erudaCode)
    // eruda.add(erudaFeatures)
    // eruda.add(erudaFps)
    // eruda.add(erudaTiming)
    // eruda.add(erudaMemory)
    if (loading || initialized) return
    loading = true
    import('eruda')
        .then(res => {
            loading = false
            const eruda = res.default
            eruda.init({
                useShadowDom: true,
                defaults: {
                    theme: 'Material Oceanic'
                }
            })
            initialized = true
        })
        .catch(e => {
            loading = false
            console.log(e)
        })
}
export { init }
