rwsdk 0.1.30 → 0.1.32
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/dist/runtime/script.d.ts
CHANGED
package/dist/runtime/script.js
CHANGED
|
@@ -109,19 +109,19 @@ export const miniflareHMRPlugin = (givenOptions) => [
|
|
|
109
109
|
let clientDirectiveChanged = false;
|
|
110
110
|
let serverDirectiveChanged = false;
|
|
111
111
|
if (!clientFiles.has(ctx.file) && hasClientDirective) {
|
|
112
|
-
clientFiles.add(ctx.file);
|
|
112
|
+
clientFiles.add(normalizeModulePath(ctx.file, givenOptions.rootDir));
|
|
113
113
|
clientDirectiveChanged = true;
|
|
114
114
|
}
|
|
115
115
|
else if (clientFiles.has(ctx.file) && !hasClientDirective) {
|
|
116
|
-
clientFiles.delete(ctx.file);
|
|
116
|
+
clientFiles.delete(normalizeModulePath(ctx.file, givenOptions.rootDir));
|
|
117
117
|
clientDirectiveChanged = true;
|
|
118
118
|
}
|
|
119
119
|
if (!serverFiles.has(ctx.file) && hasServerDirective) {
|
|
120
|
-
serverFiles.add(ctx.file);
|
|
120
|
+
serverFiles.add(normalizeModulePath(ctx.file, givenOptions.rootDir));
|
|
121
121
|
serverDirectiveChanged = true;
|
|
122
122
|
}
|
|
123
123
|
else if (serverFiles.has(ctx.file) && !hasServerDirective) {
|
|
124
|
-
serverFiles.delete(ctx.file);
|
|
124
|
+
serverFiles.delete(normalizeModulePath(ctx.file, givenOptions.rootDir));
|
|
125
125
|
serverDirectiveChanged = true;
|
|
126
126
|
}
|
|
127
127
|
if (clientDirectiveChanged) {
|
|
@@ -129,12 +129,14 @@ export const miniflareHMRPlugin = (givenOptions) => [
|
|
|
129
129
|
invalidateModule(ctx.server, environment, "virtual:use-client-lookup.js");
|
|
130
130
|
});
|
|
131
131
|
invalidateModule(ctx.server, environment, VIRTUAL_SSR_PREFIX + "/@id/virtual:use-client-lookup.js");
|
|
132
|
+
invalidateModule(ctx.server, environment, VIRTUAL_SSR_PREFIX + "virtual:use-client-lookup.js");
|
|
132
133
|
}
|
|
133
134
|
if (serverDirectiveChanged) {
|
|
134
135
|
["client", "ssr", environment].forEach((environment) => {
|
|
135
136
|
invalidateModule(ctx.server, environment, "virtual:use-server-lookup.js");
|
|
136
137
|
});
|
|
137
138
|
invalidateModule(ctx.server, environment, VIRTUAL_SSR_PREFIX + "/@id/virtual:use-server-lookup.js");
|
|
139
|
+
invalidateModule(ctx.server, environment, VIRTUAL_SSR_PREFIX + "virtual:use-server-lookup.js");
|
|
138
140
|
}
|
|
139
141
|
// todo(justinvdm, 12 Dec 2024): Skip client references
|
|
140
142
|
const modules = Array.from(ctx.server.environments[environment].moduleGraph.getModulesByFile(ctx.file) ?? []);
|