@robotical/sensors-dashboard
Version:
A dashboard tool for depicting Marty data by Robotical
57 lines (55 loc) • 1.24 kB
Markdown
1. npx create-react-app cra-package --template typescript
2. babel.config.json {
"presets": [
[
"@babel/env",
{
"targets": {
"edge": "17",
"firefox": "60",
"chrome": "67",
"safari": "11.1"
},
"useBuiltIns": "usage",
"corejs": "3.6.5"
}
],
["@babel/preset-typescript"],
["@babel/preset-react", {"runtime": "automatic"}]
]
}
3. tsconfig.json {
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"outDir": "dist",
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"declaration": true,
"emitDeclarationOnly": true,
"isolatedModules": true,
// "noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
],
"exclude": [
"node_modules",
"dist"
]
}
Troubleshooting
To avoid Hooks error due to different react versions in packages
add react <= version in peerDependencies and devDependencies of the packages