6 ms·
Re 1) Where should you put the code to initialize the SDK? Code that ideally should only be ran once in the entire lifecycle of the page. For Firebase, will ES
by ampdepolymerase 5y ago
Re 1) Where should you put the code to initialize the SDK? Code that ideally should only be ran once in the entire lifecycle of the page.
For Firebase, will ES modules help with code splitting? The new Svelte kit framework is built by Vite (runs on ES build underneath).
- pier25 5y agoIf you have code in say store.js it will triggered whenever the file is imported the first time. I also trigger init code from my entry point (eg: main.js).
- akiselev 5y agoI use a dynamic `import()` in the login form submit handler with an initialization flag. Code splitting is handled by the bundler