Every client file reached hooks and element types through the central
require seam (src/client/react.ts) and spelled them React.useState /
ReactNS.ReactElement. Import the members directly instead — named value
imports for hooks, inline type-only imports for element types — and let
the bundler own the single require('react'), which is exactly what the
platform module table answers.
This needs JSX off the classic runtime (it required a React identifier
in every tsx scope): tsconfig moves to jsx: react-jsx, so the bundle
sources jsx from 'react/jsx-runtime', already seeded by every supported
harness (verified against the dsh-v0.1.2-rc.1 platform.ts). The bundle
smoke's fake module table gains the specifier to stay a faithful shell
stand-in. h() survives as a local createElement alias at the slot
render-prop seams and the lightbox portal imports createPortal from
react-dom directly.
Verified: the built client.js requires react, react/jsx-runtime, and
react-dom exactly once each; the compat lane (bundle smoke + the
real-baseline matrix) passes against the fresh artifacts; the full gate
stays green with per-file coverage at 100%.
18 lines
405 B
JSON
18 lines
405 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "ESNext",
|
|
"moduleResolution": "Bundler",
|
|
"lib": ["ES2022", "DOM"],
|
|
"jsx": "react-jsx",
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"skipLibCheck": true,
|
|
"isolatedModules": true,
|
|
"verbatimModuleSyntax": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"types": []
|
|
},
|
|
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
}
|