loading up the forgejo repo on tangled to test page performance
at forgejo 21 lines 791 B view raw
1import {createApp} from 'vue'; 2 3export async function initRepoCodeFrequency() { 4 const el = document.getElementById('repo-code-frequency-chart'); 5 if (!el) return; 6 7 const {default: RepoCodeFrequency} = await import(/* webpackChunkName: "code-frequency-graph" */'../components/RepoCodeFrequency.vue'); 8 try { 9 const View = createApp(RepoCodeFrequency, { 10 locale: { 11 loadingTitle: el.getAttribute('data-locale-loading-title'), 12 loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'), 13 loadingInfo: el.getAttribute('data-locale-loading-info'), 14 }, 15 }); 16 View.mount(el); 17 } catch (err) { 18 console.error('RepoCodeFrequency failed to load', err); 19 el.textContent = el.getAttribute('data-locale-component-failed-to-load'); 20 } 21}