phanpy/src/main.jsx
Lim Chee Aun d6c0f83c15 Remove iconify-icon web component, bundle all icons
The whole iconify thing is about 20KB (8KB min-gzip), it's too huge just for icons.

Instead of getting icons from the API/CDN, bundle them all in.
2023-01-11 09:47:46 +08:00

28 lines
606 B
JavaScript

import './index.css';
import { render } from 'preact';
import { App } from './app';
if (import.meta.env.DEV) {
import('preact/debug');
}
render(<App />, document.getElementById('app'));
// Clean up iconify localStorage
// TODO: Remove this after few weeks?
setTimeout(() => {
try {
Object.keys(localStorage).forEach((key) => {
if (key.startsWith('iconify')) {
localStorage.removeItem(key);
}
});
Object.keys(sessionStorage).forEach((key) => {
if (key.startsWith('iconify')) {
sessionStorage.removeItem(key);
}
});
} catch (e) {}
}, 5000);