UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

47 lines (46 loc) 1.05 kB
import { writeFile } from "fs/promises"; import { existsAsync } from "../utils/existsAsync.native.js"; function ensureTSConfig() { existsAsync("tsconfig.json").then(function (hasTsConfig) { if (!hasTsConfig) { console.info(`[one] adding default tsconfig.json. to disable set one/vite { config: { tsConfigPaths: false } }`); writeFile("tsconfig.json", `{ "compilerOptions": { "baseUrl": ".", "paths": { "~/*": ["./*"] }, "strict": true, "rootDir": ".", "module": "Preserve", // allows react-native style imports without path extensions, for compat with platform-specific files "moduleResolution": "Bundler", "preserveSymlinks": true, "skipLibCheck": true, "jsx": "react-jsx", "noImplicitAny": false, "types": [ "node", "react", "vite/client" ], "lib": [ "dom", "esnext" ] }, "exclude": [ "node_modules", ".expo", "**/test", "**/dist", "**/types", "**/__tests__" ], } `); } }); } export { ensureTSConfig }; //# sourceMappingURL=ensureTsConfig.native.js.map