一覧へ戻る
privatenumber/rollup-plugin-htmlvue(新しいタブで開きます)
主要言語: TypeScript
Rollup plugin for transforming HTML/XML to Vue SFC
- star 数
- 3
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 1
- 最終更新
- 2026/10/30
主要言語: TypeScript
Rollup plugin for transforming HTML/XML to Vue SFC
Import HTML-snippets and SVGs as Vue components.
Great for compiling SVG files as Vue.js components.
npm i -D rollup-plugin-vue rollup-plugin-htmlvue
rollup.config.js
import vue from 'rollup-plugin-vue' import htmlvue from 'rollup-plugin-htmlvue' export default { // ... plugins: [ vue(), htmlvue() ] }
By default, it only automatically resolves .html files. To apply it to other extensions:
htmlvue({ include: '**/*.svg' })
Type: boolean
Default: false
Adds v-pre to the root element.
Type: boolean
Default: false
Adds v-once to the root element.
Type: boolean
Adds functional to the template to make it a functional component. Only supported in Vue 2.
Type: boolean
Adds v-on="$listeners" to the root element to inherit event listeners. Only supported in Vue 2.
Patterns to identify which files to apply the plugin to. Passed into @rollup/pluginutils.