Skip to content

Commit

Permalink
fix(platform): make route invalidation checks more flexible (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Apr 13, 2023
1 parent 534cc76 commit e7bc83f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/platform/src/lib/router-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export function routerPlugin(): Plugin[] {
) {
server.moduleGraph.fileToModulesMap.forEach((mods) => {
mods.forEach((mod) => {
if (mod.id?.includes('@analogjs_router.js')) {
if (
mod.id?.includes('analogjs') &&
mod.id?.includes('router')
) {
server.moduleGraph.invalidateModule(mod);

mod.importers.forEach((imp) => {
Expand Down

0 comments on commit e7bc83f

Please sign in to comment.