Vite Plugin for Vue Script Setup Extension

0.4.0 · abandoned · verified Sun Apr 19

This package, `vite-plugin-vue-setup-extend`, enhances the `<script setup>` syntactic sugar in Vue Single File Components (SFCs). Its primary function is to allow developers to define additional attributes directly on the `<script setup>` tag, such as `name` and `inheritAttrs`, which are typically unavailable in the standard `<script setup>` syntax. This capability is particularly useful for debugging with Vue DevTools, enabling recursive components, or explicitly setting component names for clearer component hierarchies. The current stable version is 0.4.0, but it was last published over four years ago (January 2022). Due to its lack of recent updates, it is considered abandoned and may not be compatible with newer versions of Vue or Vite, which have undergone significant changes since its last release. Users should proceed with caution and be prepared for potential compatibility issues with modern tooling.

Common errors

Warnings

Install

Imports

Quickstart

This configuration demonstrates how to integrate `vite-plugin-vue-setup-extend` into your `vite.config.ts` file. It ensures that the plugin is activated alongside the official `@vitejs/plugin-vue` to extend `<script setup>` syntax capabilities.

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueSetupExtend from 'vite-plugin-vue-setup-extend';

export default defineConfig({
  plugins: [
    vue(),
    vueSetupExtend()
  ],
  // Other Vite configurations...
});

view raw JSON →