Closed lyhourchhen closed 3 years ago
compilerOptions.paths must not be set (aliased imports are not supported)
Initial options: { "source": "tsconfig", "tsConfigPath": "./tsconfig.extend.json", "baseUrl": "./", "debug": true } Normalized options: { "source": "tsconfig", "baseUrl": "./", "tsConfigPath": "./tsconfig.extend.json", "debug": true } Aliases: { "@src": "/Users/lyhourchhen/Developments/gogym-pos/src", "@components": "/Users/lyhourchhen/Developments/gogym-pos/src/components", "@services": "/Users/lyhourchhen/Developments/gogym-pos/src/services", "@pages": "/Users/lyhourchhen/Developments/gogym-pos/src/pages", "@api-generator": "/Users/lyhourchhen/Developments/gogym-pos/src/generators/gogym-gen-api.ts", "@uri": "/Users/lyhourchhen/Developments/gogym-pos/src/constants/rest-uri.constant.ts" } Webpack Config: { "react-native": "react-native-web", "src": "/Users/lyhourchhen/Developments/gogym-pos/src", "@src": "/Users/lyhourchhen/Developments/gogym-pos/src", "@components": "/Users/lyhourchhen/Developments/gogym-pos/src/components", "@services": "/Users/lyhourchhen/Developments/gogym-pos/src/services", "@pages": "/Users/lyhourchhen/Developments/gogym-pos/src/pages", "@api-generator": "/Users/lyhourchhen/Developments/gogym-pos/src/generators/gogym-gen-api.ts", "@uri": "/Users/lyhourchhen/Developments/gogym-pos/src/constants/rest-uri.constant.ts" } The following changes are being made to your tsconfig.json file: - compilerOptions.paths must not be set (aliased imports are not supported)
/* eslint-disable @typescript-eslint/no-var-requires */ const CracoLessPlugin = require("craco-less"); const CracoAlias = require("craco-alias"); module.exports = { plugins: [ { plugin: CracoAlias, options: { source: "tsconfig", tsConfigPath: "./tsconfig.extend.json", baseUrl: "./", debug: true, }, }, { plugin: CracoLessPlugin, options: { lessLoaderOptions: { lessOptions: { modifyVars: { "@primary-color": "#62caad" }, javascriptEnabled: true, }, }, }, }, ], };
resolved by disable debug option in craco option
compilerOptions.paths must not be set (aliased imports are not supported)
Output
craco.config.js