@vue.ts/complex-types
@vue.ts/complex-types
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
Related Packages
@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
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 | |
| 1.0.0-beta.8 | >=3.5.22 | MIT | |
| 1.0.0-beta.7 | >=3.5.22 | MIT | |
| 1.0.0-beta.6 | >=3.5.22 | MIT | |
| 1.0.0-beta.5 | >=3.5.18 | MIT | |
| 1.0.0-beta.4 | >=3.5.18 | MIT | |
| 1.0.0-beta.3 | >=3 | MIT | |
| 1.0.0-beta.2 | ^3.3.7 | MIT | |
| 1.0.0-beta.1 | ^3.3.7 | MIT |