3 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 6y 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 6y 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 6y agoI use a dynamic `import()` in the login form submit handler with an initialization flag. Code splitting is handled by the bundler