0.0.9 • Published 1 year ago

unplugin-vue-sfc-name v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

unplugin-vue-sfc-name

NPM version

Feature

  • support name
  • support inheritAttrs
  • precise breakpoints
  • Expanded the function of automatic name generation

Usage

Basic example

<template>
  <div>hello world {{ a }}</div>
</template>

<script lang="ts" setup name="App" inheritAttrs="false">
  const a = 1
</script>

Install

npm i unplugin-vue-sfc-name
// vite.config.ts
import Starter from 'unplugin-vue-sfc-name/vite'
export default defineConfig({
  plugins: [
    Starter({ /* options */ }),
  ],
})

Example: playground/

// rollup.config.js
import Starter from 'unplugin-vue-sfc-name/rollup'
export default {
  plugins: [
    Starter({ /* options */ }),
  ],
}

// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-vue-sfc-name/webpack')({ /* options */ })
  ]
}

// nuxt.config.js
export default {
  buildModules: [
    ['unplugin-vue-sfc-name/nuxt', { /* options */ }],
  ],
}

This module works for both Nuxt 2 and Nuxt Vite

// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-vue-sfc-name/webpack')({ /* options */ }),
    ],
  },
}

// esbuild.config.js
import { build } from 'esbuild'
import Starter from 'unplugin-vue-sfc-name/esbuild'
build({
  plugins: [Starter()],
})

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.2-beta.4

1 year ago