🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

vite-plugin-vue-auto-name

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-vue-auto-name

A Vite plugin to automatically generate file names for Vue components

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Background

Solve the name property missing after bundled.

When using this, you don't need to provide the name property manually anymore

for example /foo/bar/YourComponent.vue:

<script setup>
// ... some scripts
</script>
<template>
  <!-- ... some dom -->
</template>

will be bundled into something like this:

const _sfc_main = /* @__PURE__ */ _defineComponent({
  name: "YourComponent",
  // ... Your code
})

Install

npm install -D vite-plugin-vue-auto-name
yarn add -D vite-plugin-vue-auto-name
pnpm add -D vite-plugin-vue-auto-name

Usage

// vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vitePluginVueAutoName from 'vite-plugin-vue-auto-name'

export default defineConfig({
  plugins: [
    vue(), 
    vitePluginVueAutoName(),
    // ...other plugins
  ]
})

Keywords

vite

FAQs

Package last updated on 10 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts