diff --git a/package.json b/package.json index 4637d5e..ac6d7b3 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "prepack": "npm run build", "doc": "kkt build --app-src ./website", "start": "kkt start --app-src ./website", - "watch": "tsbb watch", - "build": "tsbb build", + "watch": "tsbb watch src/*tsx --use-babel --cjs cjs", + "build": "tsbb build src/*tsx --use-babel --cjs cjs", "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"", "test": "kkt test --env=jsdom --app-src=./website", "test:coverage": "kkt test --env=jsdom --coverage --app-src=./website" @@ -36,22 +36,22 @@ "react-dom": ">=16.9.0" }, "devDependencies": { - "@kkt/less-modules": "7.0.5", - "@kkt/raw-modules": "7.0.5", - "@kkt/scope-plugin-options": "7.0.5", - "@types/react": "17.0.38", - "@types/react-dom": "17.0.11", - "@types/react-test-renderer": "17.0.1", - "@uiw/react-github-corners": "1.5.3", - "@uiw/react-markdown-preview": "3.4.7", - "husky": "7.0.4", - "kkt": "7.0.5", - "lint-staged": "12.1.7", - "prettier": "2.5.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-test-renderer": "17.0.2", - "tsbb": "3.5.4" + "@kkt/less-modules": "^7.4.9", + "@kkt/raw-modules": "^7.4.9", + "@kkt/scope-plugin-options": "^7.4.9", + "@types/react": "^18.2.6", + "@types/react-dom": "^18.2.4", + "@types/react-test-renderer": "^18.0.0", + "@uiw/react-github-corners": "^1.5.15", + "@uiw/react-markdown-preview": "^4.1.13", + "husky": "^8.0.3", + "kkt": "^7.4.9", + "lint-staged": "^13.2.2", + "prettier": "^2.8.8", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-test-renderer": "^18.2.0", + "tsbb": "^4.1.5" }, "eslintConfig": { "extends": [ diff --git a/tsconfig.json b/tsconfig.json index 33f5f51..24ddea8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,13 +14,11 @@ "resolveJsonModule": true, "isolatedModules": true, "declaration": true, - "baseUrl": "./website", "jsx": "react-jsx", "noFallthroughCasesInSwitch": true, "noUnusedLocals": true, "experimentalDecorators": true, "removeComments": false, "noEmit": true - }, - "include": ["website", ".kktrc.ts"] + } } diff --git a/website/index.tsx b/website/index.tsx index 5288671..ee7ab34 100644 --- a/website/index.tsx +++ b/website/index.tsx @@ -1,4 +1,4 @@ -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import MarkdownPreview from '@uiw/react-markdown-preview'; import GitHubCorners from '@uiw/react-github-corners'; import logo from './logo.svg'; @@ -6,7 +6,10 @@ import Example from './Example'; import MDStr from '../README.md'; import './App.css'; -ReactDOM.render( +const container = document.getElementById('root'); +const root = createRoot(container!); + +root.render(