@ecopages/react 0.2.0-rc.2 → 0.2.0-rc.3

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/README.md +5 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -338,6 +338,8 @@ reactPlugin({
338
338
 
339
339
  Manual entries **override** auto-discovered entries for the same specifier. Discovery normalizes package subpaths to package roots; import rewrite matches **exact** specifiers registered in `runtimeModules`.
340
340
 
341
+ Each vendor entry is built from the package's browser ESM surface: Ecopages follows an `exports` import target when present and otherwise prefers a package's legacy `module` field over CJS `main`. ESM files are re-exported with `export *`. CJS files (including React's published `index.js` / `jsx-runtime`) emit explicit named exports from that same file so the vendor can provide `jsx`. Keep `runtimeModules` at package roots. A package subpath is a separate module contract and must either be registered explicitly or bundled with the consuming page/library.
342
+
341
343
  `externals` on a library vendor must already be shared vendors (React, the router bundle, or another `runtimeModules` specifier). Unmapped externals throw at plugin setup instead of emitting a bare specifier the browser cannot resolve.
342
344
 
343
345
  #### Singleton packages (MobX, Redux, Query client, audio engines)
@@ -378,6 +380,9 @@ Registering only the library vendor, or only the singleton, is not enough when t
378
380
  | Package not discovered | Layout outside `layouts/` / `components/`, or import not reachable from `render` | Move layout file or add explicit `runtimeModules` entry |
379
381
  | `@/` alias not followed | Missing or invalid tsconfig paths | Add `compilerOptions.paths`; ensure `include` globs are valid JSON (not broken by comment stripping) |
380
382
  | Stale bootstrap script hash in dev | Rendered HTML cached before runtime vendors/bootstrap scripts changed | Rebuild or touch a route file; development HTML cache keys include browser-runtime generation |
383
+ | `MISSING_EXPORT` for names like `BasePlugin` | Vendor listed CJS enumerable keys that the ESM file does not export | Register the package root only; rebuild vendors. Subpath plugins are a separate module and must be bundled or declared themselves |
384
+ | `does not provide an export named 'jsx'` | Stale React vendor generated with `export *` from CJS `jsx-runtime` | Clear `.eco` / `dist/assets/vendors` and rebuild so the CJS entry lists `jsx` / `jsxs` explicitly |
385
+ | `Calling require for "/assets/vendors/…"` | A CJS vendor graph `require()`d another runtime module after URL rewrite | Prefer packages with an ESM/`module` entry; keep sibling singletons as `runtimeModules` + `externals` |
381
386
 
382
387
  #### Tests
383
388
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecopages/react",
3
- "version": "0.2.0-rc.2",
3
+ "version": "0.2.0-rc.3",
4
4
  "description": "React integration for Ecopages",
5
5
  "keywords": [
6
6
  "ecopages",
@@ -93,16 +93,16 @@
93
93
  "directory": "packages/integrations/react"
94
94
  },
95
95
  "peerDependencies": {
96
- "@ecopages/core": "0.2.0-rc.2",
96
+ "@ecopages/core": "0.2.0-rc.3",
97
97
  "@types/react": "^19",
98
98
  "@types/react-dom": "^19",
99
99
  "react": "^19",
100
100
  "react-dom": "^19"
101
101
  },
102
102
  "dependencies": {
103
- "@ecopages/file-system": "0.2.0-rc.2",
103
+ "@ecopages/file-system": "0.2.0-rc.3",
104
104
  "@ecopages/logger": "^0.2.3",
105
- "@ecopages/mdx": "0.2.0-rc.2",
105
+ "@ecopages/mdx": "0.2.0-rc.3",
106
106
  "@mdx-js/mdx": "^3.1.1",
107
107
  "oxc-parser": "^0.141.0",
108
108
  "oxc-transform": "^0.141.0",