fix: build issue with "React is not defined"
This commit is contained in:
parent
686b5643b3
commit
8cbe5c3bf2
@ -5,8 +5,6 @@ import { Form, HandleForm } from 'react-component-form'
|
||||
import './index.css'
|
||||
import GitHubLogo from 'url:./github.jpg'
|
||||
|
||||
global.React = React
|
||||
|
||||
const App: React.FC = () => {
|
||||
const handleSubmit: HandleForm = (formData, formElement) => {
|
||||
console.clear()
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"testEnvironment": "jsdom",
|
||||
"rootDir": "./src",
|
||||
"setupFilesAfterEnv": ["<rootDir>/__test__/setup.ts"],
|
||||
"transform": {
|
||||
"^.+\\.tsx?$": "esbuild-jest"
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { render, cleanup, fireEvent } from '@testing-library/react'
|
||||
|
||||
import { Form, HandleForm } from '..'
|
||||
|
@ -1,3 +0,0 @@
|
||||
import React from 'react'
|
||||
|
||||
global.React = React
|
@ -1,4 +1,4 @@
|
||||
import { useRef } from 'react'
|
||||
import React, { useRef } from 'react'
|
||||
|
||||
export interface FormDataObject {
|
||||
[key: string]: FormDataEntryValue
|
||||
|
@ -13,7 +13,7 @@
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"moduleResolution": "node",
|
||||
"jsx": "react-jsx",
|
||||
"jsx": "react",
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
Reference in New Issue
Block a user