Skip to content

I'm at my wits end, how to compilerOptions plugin to get full typescript features on a custom SFC block? #5372

Discussion options

You must be logged in to vote

Due to limitations of TS server, it is not possible to enable semantic features in an additional virtual TS file, you can only merge the content of the custom block into script_ts to get TS support.

I am not quite sure what the expected behavior of this plugin in the server block is for you, if the behavior of this plugin is unexpected, providing an example repo would be helpful.

/** @type {import("@vue/language-core").VueLanguagePlugin} */
function plugin() {
	const importQueryConfig = null;// new URL(import.meta.url || 'http://none.org').searchParams.get('block-name');
	return {
		name: 'sfc-server-volar',
		version: 2.1,
		resolveEmbeddedCode(fileName, sfc, embeddedFile) {
			if (/script_

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by josh-hemphill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants