@flyo/nitro-astro 2.0.4 → 2.0.5
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/middleware.ts +5 -0
- package/package.json +1 -1
package/middleware.ts
CHANGED
|
@@ -18,6 +18,11 @@ async function getConfigPromise(context) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export const onRequest = defineMiddleware(async (context, next) => {
|
|
21
|
+
// ensure that on each request, the resolved config is cleared, otherwise the
|
|
22
|
+
// node server needs to be restarted to get the new config
|
|
23
|
+
// this could be an option, but its hard for developers to understand, but good for performance
|
|
24
|
+
resolvedValue = null
|
|
25
|
+
|
|
21
26
|
context.locals.config = getConfigPromise(context);
|
|
22
27
|
|
|
23
28
|
const liveEditEnabled = useFlyoIntegration().options.liveEdit;
|