Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types are not working for setting "modelResultion": "bundle" #1795

Open
snake-py opened this issue Aug 21, 2024 · 3 comments
Open

Types are not working for setting "modelResultion": "bundle" #1795

snake-py opened this issue Aug 21, 2024 · 3 comments

Comments

@snake-py
Copy link

🐛 Bug Report

I updated my tsconfig.json to a differnt module resoltuion and now the ts key inference is not working anymore. Before I had it on Node.

 {
  "compilerOptions": {
    "target": "ES2020",
    "experimentalDecorators": true,
    "useDefineForClassFields": true,
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "allowJs": false,
    "skipLibCheck": true,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "allowImportingTsExtensions": true,
    "composite": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ES2020",

    /* Bundler mode */
    "moduleResolution": "Bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",

    /* Linting */
    "strict": false,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "noFallthroughCasesInSwitch": true,

    "baseUrl": "./",
    "paths": {
      "#/*": ["./src/*"],
      "#api/*": ["./src/api/*"],
      "#components/*": ["./src/UI/components/*"],
      "#layouts/*": ["./src/UI/layouts/*"],
      "#pages/*": ["./src/pages/*"],
      "#providers/*": ["./src/providers/*"],
      "#widgets/*": ["./src/UI/widgets/*"]
    }
  },
  "types": ["vite/client", "jest", "@types/testing-library__jest-dom", "@types/react", "node"],
  "include": [
    "./global.d.ts",
    "./src/**/*.ts",
    "./src/**/*.tsx",
    "./src/**/*.json",
    "package.json",
    "jest.setup.js",
    "./src/errors/**/*.ts"
  ],
  "references": [{ "path": "./tsconfig.node.json" }],
  "exclude": ["**/*.test.ts", "**/*.test.tsx", "./dist/**/*", "node_modules", "**/*.svg", "./example/**/*"]
}

and suddenly I get
image

Using:

    "i18next": "^23.14.0",
    "i18next-browser-languagedetector": "^8.0.0",
    "i18next-http-backend": "^2.6.1",
    "i18next-resources-to-backend": "^1.2.1",
    "react-i18next": "^15.0.1",
@adrai
Copy link
Member

adrai commented Aug 24, 2024

please provide a minimal reproducible example repository

@adrai
Copy link
Member

adrai commented Aug 24, 2024

//cc @marcalexiei @ripecosta

@ripecosta
Copy link
Contributor

ripecosta commented Aug 25, 2024

I'm using "moduleResolution": "bundler" in one of my projects and types are working correctly so that shouldn't be the cause for this issue. At least not on its own. It'd be great to have a minimal reproducible example repository to poke through and figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants