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

Go to definition failed #4063

Closed
Joseph-Wheat-Carryier opened this issue Mar 10, 2024 · 3 comments
Closed

Go to definition failed #4063

Joseph-Wheat-Carryier opened this issue Mar 10, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Joseph-Wheat-Carryier
Copy link

It will go to shims-vue.d.ts aflter command + click "*.vue" tags.

This is my shims-vue.d.ts

declare module '*.vue' {
  import { defineComponent } from "vue";
  const component: ReturnType<typeof defineComponent>;
  export default component;
}

And this is tsconfig.json

{
	"compilerOptions": {
		"baseUrl": "./",
		"module": "ESNext",
		"target": "ESNext",
		"lib": ["DOM", "ESNext"],
		"declaration": true,
		"strict": true,
		"esModuleInterop": true,
		"allowSyntheticDefaultImports": true,
		"jsx": "preserve",
		"jsxFactory": "h",
		"jsxFragmentFactory": "Fragment",
		"moduleResolution": "node",
		"isolatedModules": true,
		"resolveJsonModule": true,
		"noUnusedLocals": true,
		"strictNullChecks": true,
		"forceConsistentCasingInFileNames": true,
		"paths": {
			"~/*": ["./*"],
			"@/*": ["./src/*"]
		},
		"types": [
			"vite/client",
			"node",
			"unplugin-icons/types/vue",
			"naive-ui/volar",
			"vue/ref-macros",
			"@vue-macros/reactivity-transform/macros-global"
		],
		"plugins": [{ "name": "typescript-plugin-css-modules" }]
	},
	"exclude": ["node_modules", "dist"],
	"include": ["./src/**/*.ts", "./src/**/*.vue", "./src/**/*.d.ts"]
}

@so1ve
Copy link
Member

so1ve commented Mar 11, 2024

Remove shims-vue.d.ts

@so1ve so1ve closed this as completed Mar 11, 2024
@so1ve so1ve added the question Further information is requested label Mar 11, 2024
@oshliaer
Copy link

@so1ve
Huh ... Like a rocket! ❤️

@kleenkanteen
Copy link

kleenkanteen commented Jul 12, 2024

@Joseph-Wheat-Carryier what is shims-vue.d.ts for?

Such a pain getting simple go to definition working in nuxt.....nextjs never had this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants