/* globals LIVE_RELOAD */ const div = document.createElement('div'); Object.assign(div.style, { width: '100vw', height: '100vh', position: 'fixed', top: 0, left: 0, 'z-index': 100000, background: 'rgba(0,0,0,0.9)', 'font-size': '20px', 'font-family': 'monospace', color: 'white', padding: '2.5em', 'text-align': 'center', }); const reloadMessage = LIVE_RELOAD ? 'You have live_reload enabled, the page will reload automatically when complete.' : 'You have live_reload disabled, the page will reload automatically in a few seconds.'; // eslint-disable-next-line no-unsanitized/property div.innerHTML = `

✨ webpack is compiling frontend assets ✨

To reduce GDK memory consumption, incremental on-demand compiling is on by default.
You can disable this within gdk.yml. Learn more here.

${reloadMessage}
If it doesn't, please reload the page manually.

Don't want to see this message anymore?

Follow the documentation to switch to using Vite.
Vite compiles frontend assets faster and eliminates the need for this message.

Switch to Vite
`; document.body.append(div); if (!LIVE_RELOAD) { setTimeout(() => { window.location.reload(); }, 5000); }