diff --git a/config/typescript/tsconfig.json b/config/typescript/tsconfig.json index 0068ff6..e6f0f54 100644 --- a/config/typescript/tsconfig.json +++ b/config/typescript/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { "target": "ESNext", - "composite": true, "useDefineForClassFields": true, "types": ["vite/client"], "lib": ["DOM", "DOM.Iterable", "ESNext"], @@ -12,7 +11,7 @@ "strict": true, "forceConsistentCasingInFileNames": true, "module": "ESNext", - "moduleResolution": "bundler", + "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": false, diff --git a/config/typescript/tsconfig.node.json b/config/typescript/tsconfig.node.json index d59f735..c2f8e2c 100644 --- a/config/typescript/tsconfig.node.json +++ b/config/typescript/tsconfig.node.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "module": "ESNext", - "moduleResolution": "bundler", + "moduleResolution": "node", "allowSyntheticDefaultImports": true }, "include": ["../vite/vite.component.config.ts"] diff --git a/src/components/ReactP5WrapperGuard.tsx b/src/components/ReactP5WrapperGuard.tsx index b74a8f3..c8000c8 100644 --- a/src/components/ReactP5WrapperGuard.tsx +++ b/src/components/ReactP5WrapperGuard.tsx @@ -17,9 +17,9 @@ const ErrorBoundary = React.lazy(() => })) ); -export default function ReactP5WrapperGuard( +const ReactP5WrapperGuard = ( props: P5WrapperProps -) { +) => { if (props.sketch === undefined) { console.error("[ReactP5Wrapper] The `sketch` prop is required."); @@ -52,3 +52,5 @@ export default function ReactP5WrapperGuard( ); } + +export default ReactP5WrapperGuard; \ No newline at end of file diff --git a/src/components/ReactP5WrapperWithSketch.tsx b/src/components/ReactP5WrapperWithSketch.tsx index 5a1e49f..d3c751d 100644 --- a/src/components/ReactP5WrapperWithSketch.tsx +++ b/src/components/ReactP5WrapperWithSketch.tsx @@ -9,9 +9,9 @@ import { removeCanvasInstance } from "../utils/removeCanvasInstance"; import { updateCanvasInstance } from "../utils/updateCanvasInstance"; import { withoutKeys } from "../utils/withoutKeys"; -export default function ReactP5WrapperWithSketch( +const ReactP5WrapperWithSketch = ( props: P5WrapperPropsWithSketch -) { +) => { const wrapperRef: WrapperRef = React.useRef(null); const canvasInstanceRef: CanvasInstanceRef = React.useRef(null); const userProvidedProps: SketchProps = React.useMemo( @@ -49,3 +49,5 @@ export default function ReactP5WrapperWithSketch( ); } + +export default ReactP5WrapperWithSketch;