Powered by unplugin.
npm i -D unplugin-vue-remove-attribute
Vite
// vite.config.ts
import RemoveAttributes from 'unplugin-vue-remove-attribute/vite'
export default defineConfig({
plugins: [
RemoveAttributes({ /* options */ })
]
})
Rollup
// rollup.config.js
import RemoveAttributes from 'unplugin-vue-remove-attribute/rollup'
export default {
plugins: [
RemoveAttributes({ /* options */ })
]
}
This plugin removes matching attributes in vue components, so testing attributes like data-test-...
are removed in production build.
Thanks to @antfu, this project is heavily inspired by unplugin-vue-components.
MIT License © 2022-PRESENT Marek Vospěl