Skip to content

Commit

Permalink
revert and add console log again
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Feb 14, 2025
1 parent 0bc45da commit 06ac7d4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions packages/waku/src/lib/middleware/dev-server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,9 @@ const createMainViteServer = (
const loadServerModuleMain = async (idOrFileURL: string) => {
const vite = await vitePromise;
if (!idOrFileURL.startsWith('file://')) {
if (idOrFileURL === 'waku') {
return import(
/* @vite-ignore */ filePathToFileURL(wakuDist + '/main.js')
);
} else if (idOrFileURL.startsWith('waku/')) {
if (idOrFileURL === 'waku' || idOrFileURL.startsWith('waku/')) {
// HACK `external: ['waku']` doesn't do the same
// wakuDist + srcId.slice('waku'.length) + '.js';
return import(
/* @vite-ignore */ filePathToFileURL(
wakuDist + idOrFileURL.slice('waku'.length) + '.js',
)
);
return import(/* @vite-ignore */ idOrFileURL);
}
return vite.ssrLoadModule(idOrFileURL);
}
Expand Down Expand Up @@ -331,6 +322,7 @@ const createRscViteServer = (
config: { rootDir: string; basePath: string },
initialModules: ClonableModuleNode[],
) => {
console.log('-------resolveClientEntry', id);
let file = id;
if (file.startsWith('/@fs/')) {
file = file.slice('/@fs'.length); // keep '/' at the beginning
Expand Down

0 comments on commit 06ac7d4

Please sign in to comment.