v3.1.5

TypeScript

TypeScript は npm install して tsconfig.json を設定することで使えます。compilerOptions.typesminista/client を加えることで、SVG の React Component 化・インポート・ファイルの文字列インポート *?raw・Partial Hydration *?ph の定義を反映できます。

$ npm install --save-dev typescript @types/react @types/react-dom
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "allowSyntheticDefaultImports": true,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "noErrorTruncation": true,
    "jsx": "react-jsx",
    "types": ["minista/client"]
  },
  "include": ["./minista.config.ts", "src"]
}