dinou 9.3.0 → 10.0.1
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/CHANGELOG.md +196 -0
- package/README.md +157 -132
- package/dinou/adapters/bun.js +34 -5
- package/dinou/adapters/cloudflare.js +110 -17
- package/dinou/adapters/deno.js +46 -8
- package/dinou/adapters/netlify.js +86 -50
- package/dinou/adapters/node.js +8 -0
- package/dinou/assets.d.ts +32 -5
- package/dinou/bun/build.js +190 -106
- package/dinou/cli.js +992 -532
- package/dinou/cloudflare/build.js +187 -106
- package/dinou/compiled/autoprefixer/index.js +509 -517
- package/dinou/compiled/babel-core/index.js +738 -716
- package/dinou/compiled/babel-generator/index.js +341 -299
- package/dinou/compiled/babel-loader/index.js +766 -744
- package/dinou/compiled/babel-parser/index.js +2 -2
- package/dinou/compiled/babel-plugin-react-compiler/index.js +178 -178
- package/dinou/compiled/babel-plugin-syntax-import-meta/index.js +4 -4
- package/dinou/compiled/babel-preset-react/index.js +752 -730
- package/dinou/compiled/babel-preset-typescript/index.js +738 -716
- package/dinou/compiled/babel-traverse/index.js +463 -433
- package/dinou/compiled/babel-types/index.js +176 -176
- package/dinou/compiled/chokidar/index.js +4 -4
- package/dinou/compiled/commander/index.js +15 -15
- package/dinou/compiled/copy-webpack-plugin/index.js +433 -425
- package/dinou/compiled/css-loader/index.js +289 -289
- package/dinou/compiled/css-loader/runtime/api.js +85 -0
- package/dinou/compiled/css-loader/runtime/getUrl.js +26 -0
- package/dinou/compiled/css-loader/runtime/noSourceMaps.js +5 -0
- package/dinou/compiled/css-loader/runtime/package.json +3 -0
- package/dinou/compiled/css-loader/runtime/sourceMaps.js +16 -0
- package/dinou/compiled/fast-glob/index.js +5810 -0
- package/dinou/compiled/generic-names/index.js +16 -16
- package/dinou/compiled/mini-css-extract-plugin/{chunk-YYEJWYXE.js → chunk-R6DP5ZYM.js} +36 -36
- package/dinou/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +253 -0
- package/dinou/compiled/mini-css-extract-plugin/hmr/normalize-url.js +39 -0
- package/dinou/compiled/mini-css-extract-plugin/hmr/package.json +3 -0
- package/dinou/compiled/mini-css-extract-plugin/index.js +1 -1
- package/dinou/compiled/mini-css-extract-plugin/loader.js +5 -5
- package/dinou/compiled/postcss/index.js +83 -83
- package/dinou/compiled/postcss-import/index.js +147 -117
- package/dinou/compiled/postcss-modules/index.js +216 -216
- package/dinou/compiled/resolve/index.js +1224 -0
- package/dinou/compiled/rollup-plugin-babel/index.js +753 -731
- package/dinou/compiled/rollup-plugin-commonjs/index.js +43 -38
- package/dinou/compiled/rollup-plugin-delete/index.js +615 -253
- package/dinou/compiled/rollup-plugin-json/index.js +22 -18
- package/dinou/compiled/rollup-plugin-node-resolve/index.js +130 -100
- package/dinou/compiled/rollup-plugin-postcss/index.js +3299 -3277
- package/dinou/compiled/rollup-plugin-replace/index.js +34 -29
- package/dinou/compiled/tailwindcss-postcss/index.js +214 -211
- package/dinou/compiled/vendors-manifest.json +59 -83
- package/dinou/core/asset-extensions.js +482 -33
- package/dinou/core/bailout-proxy.js +21 -2
- package/dinou/core/build-static-pages.js +523 -371
- package/dinou/core/builtin-asset-extensions.js +63 -0
- package/dinou/core/cache-revalidate.js +449 -256
- package/dinou/core/cache-slot.js +289 -79
- package/dinou/core/client-webpack.jsx +470 -39
- package/dinou/core/client.jsx +402 -39
- package/dinou/core/config.js +3 -0
- package/dinou/core/copy-static-dirs.js +98 -0
- package/dinou/core/createScopedName.js +22 -4
- package/dinou/core/dinou-paths.js +1 -1
- package/dinou/core/discover-layouts.js +200 -0
- package/dinou/core/edge-ssr.js +1 -1
- package/dinou/core/ensure-vendor-mode.js +78 -19
- package/dinou/core/env.js +544 -0
- package/dinou/core/export-static.js +41 -9
- package/dinou/core/generate-route-types.js +989 -95
- package/dinou/core/generate-static-rsc.js +5 -6
- package/dinou/core/generate-static.js +45 -6
- package/dinou/core/get-abs-path-with-ext.js +217 -75
- package/dinou/core/get-asset-from-manifest.js +19 -8
- package/dinou/core/get-error-jsx.js +4 -5
- package/dinou/core/get-file-path-and-dynamic-params.js +561 -338
- package/dinou/core/get-jsx.js +220 -53
- package/dinou/core/handler.js +1647 -466
- package/dinou/core/import-module.js +7 -0
- package/dinou/core/layout-functions.js +72 -13
- package/dinou/core/link.jsx +34 -6
- package/dinou/core/load-dinou-config.js +520 -89
- package/dinou/core/manifest-provider.js +4 -14
- package/dinou/core/navigation-utils.js +141 -3
- package/dinou/core/navigation.js +134 -50
- package/dinou/core/node-middleware-runner.js +165 -0
- package/dinou/core/postcss-pipeline.js +236 -0
- package/dinou/core/ppr-context.js +114 -22
- package/dinou/core/ppr-runtime.js +391 -127
- package/dinou/core/redirect.jsx +1 -1
- package/dinou/core/render-jsx-to-client-jsx.js +216 -48
- package/dinou/core/request-context.js +59 -3
- package/dinou/core/resolve-contextual-dinou.js +523 -0
- package/dinou/core/resolve-setup-files.js +85 -27
- package/dinou/core/revalidating.js +10 -2
- package/dinou/core/route-generator.js +6 -2
- package/dinou/core/rsc-renderer.js +4 -1
- package/dinou/core/run-ssg.js +6 -0
- package/dinou/core/runtime-env.js +265 -0
- package/dinou/core/server-css-modules-plugin.js +155 -0
- package/dinou/core/server-function-proxy-webpack.js +27 -2
- package/dinou/core/server-function-proxy.js +27 -2
- package/dinou/core/slot.js +47 -2
- package/dinou/core/static-assets.js +503 -0
- package/dinou/core/storage-adapter.js +452 -24
- package/dinou/core/transform-server-functions.js +272 -24
- package/dinou/core/tsconfig-aliases.js +964 -0
- package/dinou/core/uneject.js +640 -0
- package/dinou/core/url-resolver.js +1 -1
- package/dinou/core/vfs.js +11 -2
- package/dinou/css.d.ts +4 -1
- package/dinou/deno/build.js +205 -153
- package/dinou/deno/seed-kv.js +4 -0
- package/dinou/env.d.ts +22 -2
- package/dinou/esbuild/build.js +40 -50
- package/dinou/esbuild/dev.js +33 -7
- package/dinou/esbuild/helpers-esbuild/get-config-esbuild-prod.js +41 -16
- package/dinou/esbuild/helpers-esbuild/get-config-esbuild.js +51 -49
- package/dinou/esbuild/helpers-esbuild/get-esbuild-entries.js +73 -60
- package/dinou/esbuild/helpers-esbuild/swc-disk-cache.js +35 -16
- package/dinou/esbuild/helpers-esbuild/write.js +13 -3
- package/dinou/esbuild/plugins-esbuild/assets-plugin.js +100 -238
- package/dinou/esbuild/plugins-esbuild/babel-react-compiler-plugin.js +73 -29
- package/dinou/esbuild/plugins-esbuild/css-processor-plugin.js +283 -91
- package/dinou/esbuild/plugins-esbuild/manifest-generator-plugin.js +3 -5
- package/dinou/esbuild/plugins-esbuild/react-client-manifest-plugin.js +9 -3
- package/dinou/esbuild/plugins-esbuild/server-functions-plugin.js +4 -3
- package/dinou/esbuild/plugins-esbuild/stable-chunk-names-and-maps-plugin.js +10 -1
- package/dinou/esbuild/plugins-postcss/postcss-extract-plugin.js +84 -21
- package/dinou/esbuild/react-refresh/esm-hmr/client.js +31 -10
- package/dinou/esbuild/react-refresh/esm-hmr-plugin.js +48 -18
- package/dinou/esbuild/react-refresh/is-react-refresh-boundary.js +9 -1
- package/dinou/esbuild/react-refresh/react-refresh-runtime.js +13 -7
- package/dinou/index.d.ts +1028 -88
- package/dinou/node/build.js +138 -74
- package/dinou/node/bundle-dual-engine.js +393 -131
- package/dinou/node/dev.js +1005 -275
- package/dinou/package.json +11 -34
- package/dinou/rollup/postcss.config.js +3 -4
- package/dinou/rollup/react-refresh/esm-hmr/client.js +31 -10
- package/dinou/rollup/react-refresh/react-refresh-wrap-modules.js +16 -13
- package/dinou/rollup/react-refresh/rollup-plugin-esm-hmr.js +53 -7
- package/dinou/rollup/rollup-plugins/dinou-asset-plugin.js +58 -20
- package/dinou/rollup/rollup-plugins/manifest-generator-plugin.js +16 -7
- package/dinou/rollup/rollup-plugins/rollup-plugin-react-client-manifest.js +118 -42
- package/dinou/rollup/rollup-plugins/rollup-plugin-server-functions.js +48 -36
- package/dinou/rollup/rollup.config.js +174 -101
- package/dinou/scripts/build-vendors.js +123 -33
- package/dinou/server.d.ts +126 -15
- package/dinou/webpack/helpers/get-webpack-entries.js +87 -41
- package/dinou/webpack/helpers/patch-webpack-internals.js +93 -1
- package/dinou/webpack/loaders/server-functions-loader.js +1 -1
- package/dinou/webpack/plugins/manifest-generator-plugin.js +27 -7
- package/dinou/webpack/plugins/server-functions-plugin.js +39 -12
- package/dinou/webpack/plugins/webpack-memory-plugin.js +25 -12
- package/dinou/webpack/postcss.config.js +3 -4
- package/dinou/webpack/webpack.config.js +408 -132
- package/eject.js +6 -224
- package/package.json +7 -9
- package/dinou/compiled/cross-env/index.js +0 -661
- package/dinou/compiled/dotenv/index.js +0 -375
- package/dinou/compiled/esbuild-copy-static-files/index.js +0 -63
- package/dinou/compiled/esbuild-tsconfig-paths/index.js +0 -1314
- package/dinou/compiled/rollup-plugin-copy/index.js +0 -12066
- package/dinou/compiled/rollup-plugin-tsconfig-paths/index.js +0 -569
- package/dinou/compiled/tsconfig-paths-webpack-plugin/index.js +0 -3956
|
@@ -150,7 +150,13 @@ socket.addEventListener("message", ({ data: _data }) => {
|
|
|
150
150
|
|
|
151
151
|
if (data.type === "rsc-update") {
|
|
152
152
|
if (typeof window !== "undefined" && typeof window.__DINOU_ROUTER_REFRESH__ === "function") {
|
|
153
|
-
|
|
153
|
+
const refreshLayout = Boolean(
|
|
154
|
+
data.layout ||
|
|
155
|
+
(data.path &&
|
|
156
|
+
(/(?:^|[\\/])layout\.[jt]sx?$/i.test(data.path) ||
|
|
157
|
+
/\.module\.css$/i.test(data.path)))
|
|
158
|
+
);
|
|
159
|
+
window.__DINOU_ROUTER_REFRESH__({ layout: refreshLayout });
|
|
154
160
|
return;
|
|
155
161
|
}
|
|
156
162
|
reload();
|
|
@@ -162,16 +168,31 @@ socket.addEventListener("message", ({ data: _data }) => {
|
|
|
162
168
|
(data.type === "update" && data.url && (data.url.endsWith(".css") || data.url.includes("styles.css")))
|
|
163
169
|
) {
|
|
164
170
|
const targetUrl = data.url ? data.url.split("?")[0] : "";
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
const applyStyleUpdate = () => {
|
|
172
|
+
const links = document.querySelectorAll('link[rel="stylesheet"]');
|
|
173
|
+
for (const link of links) {
|
|
174
|
+
const rawHref = link.getAttribute("href");
|
|
175
|
+
if (!rawHref) continue;
|
|
176
|
+
const cleanHref = rawHref.split("?")[0];
|
|
177
|
+
if (!targetUrl || cleanHref.endsWith(targetUrl) || targetUrl.endsWith(cleanHref) || cleanHref.includes("styles.css")) {
|
|
178
|
+
const nextUrl = new URL(link.href, window.location.origin);
|
|
179
|
+
nextUrl.searchParams.set("t", String(Date.now()));
|
|
180
|
+
link.href = nextUrl.href;
|
|
181
|
+
}
|
|
174
182
|
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
if (typeof document !== "undefined" && document.body?.getAttribute("data-hydrated") === "true") {
|
|
186
|
+
applyStyleUpdate();
|
|
187
|
+
} else if (typeof window !== "undefined") {
|
|
188
|
+
let attempts = 0;
|
|
189
|
+
const waitHydration = setInterval(() => {
|
|
190
|
+
attempts++;
|
|
191
|
+
if (document.body?.getAttribute("data-hydrated") === "true" || attempts >= 60) {
|
|
192
|
+
clearInterval(waitHydration);
|
|
193
|
+
applyStyleUpdate();
|
|
194
|
+
}
|
|
195
|
+
}, 50);
|
|
175
196
|
}
|
|
176
197
|
return;
|
|
177
198
|
}
|
|
@@ -64,10 +64,28 @@ async function saveSwcCache() {
|
|
|
64
64
|
export default function esmHmrPlugin({
|
|
65
65
|
entryNames = ["main", "error"],
|
|
66
66
|
changedIds,
|
|
67
|
+
cssModuleClassChanges,
|
|
67
68
|
hmrEngine,
|
|
68
69
|
hmrPort,
|
|
69
70
|
} = {}) {
|
|
70
|
-
const port =
|
|
71
|
+
const port =
|
|
72
|
+
hmrPort !== undefined
|
|
73
|
+
? hmrPort
|
|
74
|
+
: Number(process.env.HMR_PORT || Number(process.env.PORT || 3000) + 1);
|
|
75
|
+
|
|
76
|
+
const isPureCssStyleUpdate = (lowerPath) => {
|
|
77
|
+
if (
|
|
78
|
+
!lowerPath.endsWith(".css") &&
|
|
79
|
+
!lowerPath.endsWith(".scss") &&
|
|
80
|
+
!lowerPath.endsWith(".less")
|
|
81
|
+
) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
if (!lowerPath.endsWith(".module.css")) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
return !cssModuleClassChanges?.has(lowerPath);
|
|
88
|
+
};
|
|
71
89
|
|
|
72
90
|
return {
|
|
73
91
|
name: "esm-hmr",
|
|
@@ -83,7 +101,7 @@ export default function esmHmrPlugin({
|
|
|
83
101
|
const entryAbsPaths = [];
|
|
84
102
|
const entryOutputNames = [];
|
|
85
103
|
|
|
86
|
-
if (!serverStarted) {
|
|
104
|
+
if (!serverStarted && !hmrEngine?.value) {
|
|
87
105
|
const server = createServer();
|
|
88
106
|
server.on("error", (err) => {
|
|
89
107
|
if (err.code === "EADDRINUSE") {
|
|
@@ -202,6 +220,15 @@ export default function esmHmrPlugin({
|
|
|
202
220
|
const outfile_basename = path.basename(outfile);
|
|
203
221
|
const urlId = "/" + outfile_basename;
|
|
204
222
|
const safeId = JSON.stringify(urlId);
|
|
223
|
+
if (outfile_basename === "main.js") {
|
|
224
|
+
const mainSource = new TextDecoder().decode(outputFile.contents);
|
|
225
|
+
if (!/^\s*import\s+["']\/runtime\.js["'];/.test(mainSource)) {
|
|
226
|
+
outputFile.contents = new TextEncoder().encode(
|
|
227
|
+
`import "/runtime.js";\n${mainSource}`
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
205
232
|
const frameworkEntries = new Set([
|
|
206
233
|
"main.js",
|
|
207
234
|
"serverFunctionProxy.js",
|
|
@@ -238,13 +265,16 @@ export default function esmHmrPlugin({
|
|
|
238
265
|
}
|
|
239
266
|
const wrappedCode = `
|
|
240
267
|
const RefreshRuntime = window.__reactRefreshRuntime;
|
|
268
|
+
const actualRuntime = RefreshRuntime?.default || RefreshRuntime;
|
|
241
269
|
let prevRefreshReg = window.$RefreshReg$;
|
|
242
270
|
let prevRefreshSig = window.$RefreshSig$;
|
|
243
271
|
window.$RefreshReg$ = (type, id) => {
|
|
244
272
|
const fullId = (id && id.includes('#')) ? id : (${safeId} + '#' + id);
|
|
245
|
-
|
|
273
|
+
actualRuntime?.register(type, fullId);
|
|
246
274
|
};
|
|
247
|
-
window.$RefreshSig$ =
|
|
275
|
+
window.$RefreshSig$ = actualRuntime?.createSignatureFunctionForTransform
|
|
276
|
+
? actualRuntime.createSignatureFunctionForTransform.bind(actualRuntime)
|
|
277
|
+
: (prevRefreshSig || (() => (type) => type));
|
|
248
278
|
if (!import.meta.hot) import.meta.hot = window.__hotContext?.(${safeId});
|
|
249
279
|
// --- original code ---
|
|
250
280
|
${source}
|
|
@@ -252,7 +282,7 @@ export default function esmHmrPlugin({
|
|
|
252
282
|
if (import.meta.hot) {
|
|
253
283
|
import.meta.hot.accept(({module}) => {
|
|
254
284
|
if (window.__isReactRefreshBoundary && window.__isReactRefreshBoundary(module)) {
|
|
255
|
-
window.__debouncePerformReactRefresh();
|
|
285
|
+
window.__debouncePerformReactRefresh?.();
|
|
256
286
|
} else {
|
|
257
287
|
// Fallback: full reload if it is not a boundary
|
|
258
288
|
import.meta.hot.invalidate();
|
|
@@ -279,6 +309,7 @@ export default function esmHmrPlugin({
|
|
|
279
309
|
if (isInitialBuild) {
|
|
280
310
|
isInitialBuild = false;
|
|
281
311
|
changedIds?.clear();
|
|
312
|
+
cssModuleClassChanges?.clear();
|
|
282
313
|
return;
|
|
283
314
|
}
|
|
284
315
|
|
|
@@ -286,19 +317,20 @@ export default function esmHmrPlugin({
|
|
|
286
317
|
return;
|
|
287
318
|
}
|
|
288
319
|
|
|
289
|
-
if (changedIds.size === 0)
|
|
320
|
+
if (changedIds.size === 0) {
|
|
321
|
+
cssModuleClassChanges?.clear();
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
290
324
|
|
|
291
|
-
// If only CSS files
|
|
325
|
+
// If only CSS files (or CSS Modules whose exported class names did not change)
|
|
326
|
+
// were modified, styles are updated via style-update in cssProcessorPlugin.
|
|
292
327
|
// Do NOT trigger full reload or JS component updates.
|
|
293
|
-
const isCssOnly = Array.from(changedIds).every((id) =>
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
(lower.endsWith(".css") || lower.endsWith(".scss") || lower.endsWith(".less")) &&
|
|
297
|
-
!lower.endsWith(".module.css")
|
|
298
|
-
);
|
|
299
|
-
});
|
|
328
|
+
const isCssOnly = Array.from(changedIds).every((id) =>
|
|
329
|
+
isPureCssStyleUpdate(id.toLowerCase())
|
|
330
|
+
);
|
|
300
331
|
if (isCssOnly) {
|
|
301
332
|
changedIds.clear();
|
|
333
|
+
cssModuleClassChanges?.clear();
|
|
302
334
|
return;
|
|
303
335
|
}
|
|
304
336
|
|
|
@@ -330,10 +362,7 @@ export default function esmHmrPlugin({
|
|
|
330
362
|
const cleanPath = stripNamespace(modulePath);
|
|
331
363
|
const norm = normKey(cleanPath);
|
|
332
364
|
const lower = norm.toLowerCase();
|
|
333
|
-
if (
|
|
334
|
-
(lower.endsWith(".css") || lower.endsWith(".scss") || lower.endsWith(".less")) &&
|
|
335
|
-
!lower.endsWith(".module.css")
|
|
336
|
-
) {
|
|
365
|
+
if (isPureCssStyleUpdate(lower)) {
|
|
337
366
|
return false;
|
|
338
367
|
}
|
|
339
368
|
return changedIds.has(norm);
|
|
@@ -379,6 +408,7 @@ export default function esmHmrPlugin({
|
|
|
379
408
|
}
|
|
380
409
|
saveSwcCache().catch(() => {});
|
|
381
410
|
changedIds.clear();
|
|
411
|
+
cssModuleClassChanges?.clear();
|
|
382
412
|
globalThis.__DINOU_BROADCAST_TIME__ = Date.now() - tBroadcast0;
|
|
383
413
|
});
|
|
384
414
|
},
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export function isReactRefreshBoundary(RefreshRuntime, moduleExports) {
|
|
2
|
+
if (!RefreshRuntime?.isLikelyComponentType) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
2
5
|
if (RefreshRuntime.isLikelyComponentType(moduleExports)) {
|
|
3
6
|
return true;
|
|
4
7
|
}
|
|
@@ -29,7 +32,12 @@ export function isReactRefreshBoundary(RefreshRuntime, moduleExports) {
|
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
hasExports = true;
|
|
32
|
-
|
|
35
|
+
let exportValue;
|
|
36
|
+
try {
|
|
37
|
+
exportValue = moduleExports[key];
|
|
38
|
+
} catch (e) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
33
41
|
if (!RefreshRuntime.isLikelyComponentType(exportValue)) {
|
|
34
42
|
areAllExportsComponents = false;
|
|
35
43
|
}
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import RefreshRuntime from "/react-refresh-entry.js";
|
|
2
2
|
import { isReactRefreshBoundary } from "./is-react-refresh-boundary.js";
|
|
3
3
|
|
|
4
|
+
const runtime = RefreshRuntime?.default || RefreshRuntime;
|
|
5
|
+
|
|
4
6
|
if (
|
|
5
7
|
typeof window !== "undefined" &&
|
|
6
8
|
!window.__REACT_REFRESH_RUNTIME_INSTALLED__
|
|
7
9
|
) {
|
|
8
|
-
|
|
10
|
+
runtime.injectIntoGlobalHook(window);
|
|
9
11
|
|
|
10
|
-
window.__reactRefreshRuntime =
|
|
11
|
-
window.$RefreshReg$ = () => {
|
|
12
|
-
|
|
12
|
+
window.__reactRefreshRuntime = runtime;
|
|
13
|
+
window.$RefreshReg$ = (type, id) => {
|
|
14
|
+
runtime?.register(type, id);
|
|
15
|
+
};
|
|
16
|
+
window.$RefreshSig$ = runtime?.createSignatureFunctionForTransform
|
|
17
|
+
? runtime.createSignatureFunctionForTransform.bind(runtime)
|
|
18
|
+
: () => (type) => type;
|
|
13
19
|
window.__REACT_REFRESH_RUNTIME_INSTALLED__ = true;
|
|
14
20
|
|
|
15
21
|
let refreshTimeout;
|
|
16
|
-
window.performReactRefresh =
|
|
22
|
+
window.performReactRefresh = runtime.performReactRefresh;
|
|
17
23
|
window.__debouncePerformReactRefresh = () => {
|
|
18
24
|
clearTimeout(refreshTimeout);
|
|
19
25
|
refreshTimeout = setTimeout(() => {
|
|
20
26
|
try {
|
|
21
|
-
|
|
27
|
+
runtime.performReactRefresh();
|
|
22
28
|
} catch (err) {
|
|
23
29
|
console.warn("React Refresh failed:", err);
|
|
24
30
|
}
|
|
@@ -26,5 +32,5 @@ if (
|
|
|
26
32
|
};
|
|
27
33
|
|
|
28
34
|
window.__isReactRefreshBoundary = (moduleExports) =>
|
|
29
|
-
isReactRefreshBoundary(
|
|
35
|
+
isReactRefreshBoundary(runtime, moduleExports);
|
|
30
36
|
}
|