fumapress 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/vite.js +6 -1
  2. package/package.json +1 -1
package/dist/vite.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { crawlFrameworkPkgs } from "./lib/vitefu.js";
2
+ import { fileURLToPath } from "node:url";
2
3
  //#region src/vite.ts
3
4
  function press(options) {
4
5
  return [
@@ -38,8 +39,9 @@ function core(options = {}) {
38
39
  optimizeDeps: out?.optimizeDeps
39
40
  };
40
41
  },
41
- async resolveId(source, _importer, options) {
42
+ async resolveId(source, importer, options) {
42
43
  if (source === "virtual:fumapress-core/config") return this.resolve("/press.config", void 0, options);
44
+ if (source === "@fuma-translate/react" && importer && isRscClientReferencesModule(importer)) return fileURLToPath(import.meta.resolve(source));
43
45
  if (source.startsWith("virtual:root.css")) {
44
46
  const [_id, query = ""] = source.split("?", 2);
45
47
  return await this.resolve(`/src/app.css?${query}`) ?? await this.resolve(`fumapress/css/default.css?${query}`);
@@ -50,6 +52,9 @@ function core(options = {}) {
50
52
  }
51
53
  };
52
54
  }
55
+ function isRscClientReferencesModule(id) {
56
+ return id.startsWith("\0virtual:vite-rsc/client-references") || id.startsWith("virtual:vite-rsc/client-references");
57
+ }
53
58
  function getManagedServerEntry() {
54
59
  return `import _adapter from 'waku/adapters/default';
55
60
  import pressConfig from 'virtual:fumapress-core/config';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumapress",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "An opinionated docs framework powered by Fumadocs",
5
5
  "keywords": [
6
6
  "Docs",