@nubase/create 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,7 +9,16 @@ import { userResource } from "./resources/user";
|
|
|
9
9
|
|
|
10
10
|
const apiBaseUrl =
|
|
11
11
|
import.meta.env.VITE_API_BASE_URL || "http://localhost:__BACKEND_PORT__";
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
// Preserve auth controller across HMR to prevent losing authentication state during development
|
|
14
|
+
const authController: __PROJECT_NAME_PASCAL__AuthController = (import.meta.hot
|
|
15
|
+
?.data?.authController as __PROJECT_NAME_PASCAL__AuthController) ??
|
|
16
|
+
new __PROJECT_NAME_PASCAL__AuthController(apiBaseUrl);
|
|
17
|
+
|
|
18
|
+
// Store auth controller in HMR data so it survives hot reloads
|
|
19
|
+
if (import.meta.hot) {
|
|
20
|
+
import.meta.hot.data.authController = authController;
|
|
21
|
+
}
|
|
13
22
|
|
|
14
23
|
export const config: NubaseFrontendConfig<typeof apiEndpoints> = {
|
|
15
24
|
appName: "__PROJECT_NAME_PASCAL__",
|