Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cogor/vite-plugin-vue-remove-attributes
Remove data attributes from SFC at build time
https://github.com/cogor/vite-plugin-vue-remove-attributes
vitejs vue
Last synced: 3 days ago
JSON representation
Remove data attributes from SFC at build time
- Host: GitHub
- URL: https://github.com/cogor/vite-plugin-vue-remove-attributes
- Owner: cogor
- License: mit
- Created: 2022-01-16T10:20:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-01-16T12:04:56.000Z (over 2 years ago)
- Last Synced: 2024-09-21T22:05:49.667Z (6 days ago)
- Topics: vitejs, vue
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# vite-plugin-vue-remove-attributes
Remove data attributes from SFC at build time## 📦 Install
```bash
npm i vite-plugin-vue-remove-attributes -D# yarn
yarn add vite-plugin-vue-remove-attributes -D# pnpm
pnpm add vite-plugin-vue-remove-attributes -D
```## 🦄 Usage
Add plugin to your vite.config.js
```javascript
import { defineConfig } from "vite";
import removeAttrsPlugin from "vite-plugin-vue-remove-attributes";export default defineConfig({
plugins: [
removeAttrsPlugin(["test-id"]) // By default ["test-id"]
]
});
```Inspired by [vue-cli-plugin-test-attrs](https://github.com/LinusBorg/vue-cli-plugin-test-attrs)