From 9c99f5e704dda8f90fbd3f5bea0d121b02aab1e0 Mon Sep 17 00:00:00 2001 From: Joel Chen Date: Tue, 27 Apr 2021 19:02:34 -0700 Subject: [PATCH] [fix] clean module name for refreshing --- packages/xarc-app-dev/src/lib/app-dev-middleware.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/xarc-app-dev/src/lib/app-dev-middleware.ts b/packages/xarc-app-dev/src/lib/app-dev-middleware.ts index 948b21059..980ead68a 100644 --- a/packages/xarc-app-dev/src/lib/app-dev-middleware.ts +++ b/packages/xarc-app-dev/src/lib/app-dev-middleware.ts @@ -53,6 +53,7 @@ export class AppDevMiddleware { if (!initialLoad && !_.isEmpty(data.refreshModules)) { const { refreshed, failed } = data.refreshModules.reduce( (agg, moduleName) => { + moduleName = moduleName.split("|")[0]; if (!moduleName.startsWith("webpack/runtime")) { try { const xarcOptions = loadXarcOptions(); @@ -78,7 +79,7 @@ export class AppDevMiddleware { } if (refreshed.length > 0) { - console.log(`Refreshed modules for hot reload: ${refreshed.join(", ")}`); + console.log(`Refreshed modules for hot reload`); refreshAllSubApps(); refreshAllSubApps2(); }