@vue.ts/complex-types

Resolve complex types in Vue SFCs.
11,656 112
Install
npm install @vue.ts/complex-types@0.6.0
Latest Version:0.6.0
Vue:3
License:MIT
Last Updated:Aug 26, 2026
Links: GitHub  ·  npm
Maintainer: so1ve

@vue.ts/complex-types

NPM version

Use @vue/language-core to support complex types for Vue's Macros.

For example: fixes https://github.com/vuejs/core/issues/8286.

📦 Installation

$ npm install -D @vue.ts/complex-types
$ yarn add -D @vue.ts/complex-types
$ pnpm add -D @vue.ts/complex-types

🚀 Usage

Vite
// vite.config.ts
import VueComplexTypes from "@vue.ts/complex-types/vite";

export default defineConfig({
	plugins: [
		VueComplexTypes({
			/* options */
		}),
	],
});


Rolldown
// rolldown.config.js
import VueComplexTypes from "@vue.ts/complex-types/rolldown";

export default {
	plugins: [
		VueComplexTypes({
			/* options */
		}),
		// other plugins
	],
};


Rollup
// rollup.config.js
import VueComplexTypes from "@vue.ts/complex-types/rollup";

export default {
	plugins: [
		VueComplexTypes({
			/* options */
		}),
		// other plugins
	],
};


Webpack
// webpack.config.js
module.exports = {
	/* ... */
	plugins: [
		require("@vue.ts/complex-types/webpack")({
			/* options */
		}),
	],
};


Rspack
// rspack.config.js
module.exports = {
	/* ... */
	plugins: [
		require("@vue.ts/complex-types/rspack")({
			/* options */
		}),
	],
};


Nuxt
// nuxt.config.ts
export default defineNuxtConfig({
	modules: ["@vue.ts/complex-types/nuxt"],
	complexTypes: {
		/* options */
	},
});


Vue CLI
// vue.config.js
module.exports = {
	configureWebpack: {
		plugins: [
			require("@vue.ts/complex-types/webpack")({
				/* options */
			}),
		],
	},
};


Quasar
// quasar.conf.js [Vite]
module.exports = {
	vitePlugins: [
		[
			"@vue.ts/complex-types/vite",
			{
				/* options */
			},
		],
	],
};
// quasar.conf.js [Webpack]
const VueComplexTypesPlugin = require("@vue.ts/complex-types/webpack");

module.exports = {
	build: {
		chainWebpack(chain) {
			chain.plugin("@vue.ts/complex-types").use(
				VueComplexTypesPlugin({
					/* options */
				}),
			);
		},
	},
};


esbuild
// esbuild.config.js
import { build } from "esbuild";

build({
	/* ... */
	plugins: [
		require("@vue.ts/complex-types/esbuild")({
			/* options */
		}),
	],
});


Astro
// astro.config.mjs
import VueComplexTypes from "@vue.ts/complex-types/astro";

export default defineConfig({
	integrations: [
		VueComplexTypes({
			/* options */
		}),
	],
});


📚 Options

root

Path to your project root.

  • Type: string
  • Default: process.cwd()

tsconfigPath

Path to your tsconfig.json.

  • Type: string
  • Default: "tsconfig.json"

defineEmits

Transform defineEmits or not.

  • Type: boolean
  • Default: true

defineProps

Transform defineProps or not.

  • Type: boolean
  • Default: true

📝 License

MIT. Made with ❤️ by Ray

Related Packages

@vue.ts/tsx-auto-props

Automatically add props definition for Vue 3 TSX.

29,635 112
unplugin-auto-import

Register global imports on demand for Vite and Webpack

40,166,207 3,799
@styleframe/plugin

Unplugin for Styleframe. Use it with Vite, Webpack, Astro, Nuxt, Rollup, Rspack,...

24,920 91
@relevate/unplugin-poolster

Run Poolster OpenAPI generation from Vite, Rollup, webpack, esbuild, Rspack, Rol...

197 3
@kitschpatrol/unplugin-aphex

Unplugin for module-style image imports from your macOS Photos.app library.

1,381 1

Version History

Version Released Vue License
0.6.0 ^3.3.7 MIT
0.5.0 ^3.3.7 MIT
0.4.0 ^3.3.7 MIT
Pre-releases (13)
Version Released Vue License
1.0.0-beta.13 >=3.5.26 MIT
1.0.0-beta.12 >=3.5.26 MIT
1.0.0-beta.11 >=3.5.22 MIT
1.0.0-beta.10 >=3.5.22 MIT
1.0.0-beta.9 >=3.5.22 MIT