mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-27 19:16:32 +01:00
d6c0f83c15
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.
28 lines
606 B
JavaScript
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);
|