You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Re-running ssrLoadModule() is cheap (Vite uses a cache) => eagerly calling updateUserFiles() makes sense.
116
+
// - Even for SPA apps that don't have (m)any server files? Ideally, we should set `isRuntimeDependency: true` only for server modules (let's do it once Vite has a clear separate per-environment module graphs).
117
+
awaitupdateUserFiles()
118
+
}
119
+
120
+
if(isAppFile.isConfigDependency){
121
+
/* Tailwind breaks this assertion, see https://github.com/vikejs/vike/discussions/1330#discussioncomment-7787238
122
+
const isViteModule = ctx.modules.length > 0
123
+
assert(!isViteModule)
124
+
*/
115
125
116
-
reloadConfig(file,config,'modified',server)
126
+
reloadVikeConfig()
117
127
118
-
// Trigger a full page reload. (Because files such as +config.js can potentially modify Vike's virtual files.)
119
-
constvikeVirtualFiles=getVikeVirtualFiles(server)
120
-
returnvikeVirtualFiles
121
-
}else{
122
-
// Ensure we invalidate `file` *before* server.ssrLoadModule() in updateUserFiles()
123
-
// Vite also invalidates it, but *after* handleHotUpdate() and thus after server.ssrLoadModule()
// New + file => not tracked yet by Vike (`vikeConfigObject._vikeConfigDependencies`) nor Vite (`moduleGraph`)
147
+
isPlusFile(file)||
148
+
// Trick: when fixing the path of a relative import => we don't know whether `file` is the imported file => we take a leap of faith when the conditions below are met.
149
+
// - Reloading Vike's config is cheap => eagerly reloading it makes sense when it's in an erroneous state.
// Trick: when fixing the path of a relative import => we don't know whether `file` is the imported file => we take a leap of faith when the conditions below are met.
158
-
// - Not sure how reliable that trick is.
159
-
// - Reloading Vike's config is cheap and file creation/removal is rare => the trick is worth it.
0 commit comments