Closed CGSimplePeople closed 3 years ago
package.json { "name": "myapp", "version": "0.1.0", "private": true, "dependencies": { "@craco/craco": "^5.7.0", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.15", "@types/node": "^12.0.0", "@types/react": "^16.9.53", "@types/react-dom": "^16.9.8", "craco-alias": "^2.1.1", "eslint-loader": "^4.0.2", "react": "^17.0.1", "react-dom": "^17.0.1", "react-scripts": "4.0.0", "typescript": "^4.0.3", "web-vitals": "^0.2.4" }, "scripts": { "start": "craco start", "build": "craco build", "test": "craco test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }
tsconfig.extend.json { "compilerOptions": { "baseUrl": "./src", "paths": { "@root": ["./"], "@root/": ["./"] } } }
tsconfig.json { "extends": "./tsconfig.extend.json", "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react" }, "include": [ "src" ] }
craco.config.js const CracoAlias = require("craco-alias");
module.exports = { plugins: [ { plugin: CracoAlias, options: { source: "tsconfig", tsConfigPath: "./tsconfig.extend.json", baseUrl: "./src", }, }, ], };
WARN: craco: Cannot find ESLint loader (eslint-loader). Cannot parse tsconfig.extend.json
package.json { "name": "myapp", "version": "0.1.0", "private": true, "dependencies": { "@craco/craco": "^5.7.0", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.15", "@types/node": "^12.0.0", "@types/react": "^16.9.53", "@types/react-dom": "^16.9.8", "craco-alias": "^2.1.1", "eslint-loader": "^4.0.2", "react": "^17.0.1", "react-dom": "^17.0.1", "react-scripts": "4.0.0", "typescript": "^4.0.3", "web-vitals": "^0.2.4" }, "scripts": { "start": "craco start", "build": "craco build", "test": "craco test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }
tsconfig.extend.json { "compilerOptions": { "baseUrl": "./src", "paths": { "@root": ["./"], "@root/": ["./"] } } }
tsconfig.json { "extends": "./tsconfig.extend.json", "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react" }, "include": [ "src" ] }
craco.config.js const CracoAlias = require("craco-alias");
module.exports = { plugins: [ { plugin: CracoAlias, options: { source: "tsconfig", tsConfigPath: "./tsconfig.extend.json", baseUrl: "./src", }, }, ], };
WARN: craco: Cannot find ESLint loader (eslint-loader). Cannot parse tsconfig.extend.json