fimo 0.11.0-staging.13 → 0.11.0-staging.15

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.
@@ -15,8 +15,12 @@ export function ViteLifecycles({ children }) {
15
15
  const afterUpdate = () => {
16
16
  window.parent.postMessage({ type: 'hmr/afterUpdate', payload: { ts: Date.now() } }, '*');
17
17
  };
18
- const beforeFullReload = () => {
19
- window.parent.postMessage({ type: 'hmr/beforeFullReload', payload: { ts: Date.now() } }, '*');
18
+ // Vite names the module that forced the reload (`path`/`triggeredBy`).
19
+ // Forward it: a full reload costs seconds and resets client state, and
20
+ // without the culprit there is no way to tell an unavoidable reload from
21
+ // one our own plugins caused by regenerating a module nobody can accept.
22
+ const beforeFullReload = (payload) => {
23
+ window.parent.postMessage({ type: 'hmr/beforeFullReload', payload: { ts: Date.now(), payload } }, '*');
20
24
  };
21
25
  const onError = (err) => {
22
26
  window.parent.postMessage({ type: 'hmr/error', payload: { ts: Date.now(), err } }, '*');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "0.11.0-staging.13",
3
+ "version": "0.11.0-staging.15",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "bin": {
6
6
  "fimo": "dist/cli/index.js"
@@ -21,7 +21,7 @@
21
21
  "cmdk": "^1.1.1",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "0.11.0-staging.13",
24
+ "fimo": "0.11.0-staging.15",
25
25
  "input-otp": "^1.4.2",
26
26
  "isbot": "^5",
27
27
  "lucide-react": "^0.577.0",
@@ -14,4 +14,10 @@ export default {
14
14
  // schema entries from the content API. See `references/setup-react-router.md`
15
15
  // in the fimo skill for the full setup pattern.
16
16
  buildDirectory: 'dist',
17
+ // Feed Vite's dependency scanner the client entry + every route module.
18
+ // Without it React Router hands Vite an EMPTY entry list, nothing is
19
+ // pre-bundled, and each route's deps are discovered on that route's first
20
+ // visit — which Vite answers with a full page reload, so preview links stop
21
+ // behaving like SPA links. Dev-only: it never touches the production build.
22
+ future: { unstable_optimizeDeps: true },
17
23
  } satisfies Config;
@@ -1,15 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <link rel="icon" type="image/x-icon" href="/favicon.ico" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
- <title>Welcome to your Fimo website</title>
9
- </head>
10
-
11
- <body>
12
- <div id="root"></div>
13
- <script type="module" src="/src/main.tsx"></script>
14
- </body>
15
- </html>