When wiring state/functions, avoid implicit access through window.*/globalThis. Use explicit ES module imports so code is deterministic and loads correctly, and keep code in the module/plugin that owns it.
Apply this standard
window (including Alpine root store patterns).window.Alpine?.store(...) and globalThis bridging for core dependencies; replace with imports.Example (store access)
// Prefer this:
import { createStore } from "/js/AlpineStore.js";
import { store as notificationStore } from "/components/notifications/notification-store.js";
// Avoid this pattern:
// const rootStore = window.Alpine?.store ? window.Alpine.store("root") : undefined;
// ...then rely on root/global wiring
Checklist
window.Alpine.store('root') just to get runtime state that has a dedicated module.globalThis TODOs persisting long-term for dependencies—replace with imports.Enter the URL of a public GitHub repository