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

Issue with resolving JSON file with vue-tsc #1862

Closed
azat-io opened this issue Sep 12, 2022 · 3 comments
Closed

Issue with resolving JSON file with vue-tsc #1862

azat-io opened this issue Sep 12, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@azat-io
Copy link

azat-io commented Sep 12, 2022

Screenshot 2022-09-12 at 8 48 40 PM

When I try to import .json files into .vue files with declared JSON file data as a module, vue-tsc doesn't understand the type of data being exported

Here is my TypeScript config:

{
  "compilerOptions": {
    "types": ["node"],
    "forceConsistentCasingInFileNames": true,
    "importsNotUsedAsValues": "error",
    "moduleResolution": "nodenext",
    "preserveValueImports": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "module": "esnext",
    "target": "es2020",
    "jsx": "preserve",
    "allowJs": true,
    "strict": true,
    "baseUrl": ".",
    "noEmit": true,
  }
}

Also I have "type": "module" in my package.json file. My vue-tsc version is 0.40.13.

@azat-io
Copy link
Author

azat-io commented Sep 13, 2022

Thanks!

@azat-io
Copy link
Author

azat-io commented Sep 24, 2022

Looks like the problem persists in v1.0.0-alpha.5

@johnsoncodehk
Copy link
Member

@azat-io could you provide minimal reproduction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants