Skip to content

Make the vue script setup syntax support the name attribute and fix source-map bug for debug

Notifications You must be signed in to change notification settings

lawliet7911/vite-plugin-vue-setup-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expansion based on vite-plugin-vue-setup-extend

vite-plugin-vue-setup-name

Make the vue script setup syntax support the name attribute and fix source-map bug for debug

Install (yarn or npm)

node version: >=14.18.0

yarn add vite-plugin-vue-setup-name -D

or

npm i vite-plugin-vue-setup-name -D

Usage

  • Config plugin in vite.config.ts. In this way, the required functions can be introduced as needed
import { defineConfig, Plugin } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'

export default defineConfig({
  plugins: [vue(), vueSetupExtend()],
})
  • SFC
<template>
  <div>hello world {{ a }}</div>
</template>

<script lang="ts" setup name="App">
  // need one line comment or code at least
</script>

Sample project

Vben Admin

License

MIT

About

Make the vue script setup syntax support the name attribute and fix source-map bug for debug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published