# vue-data-attr-remover

> Vue compiler module that allows you to easily remove data- attributes

Latest version **0.1.0** (published 2018-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-data-attr-remover
pnpm add vue-data-attr-remover
yarn add vue-data-attr-remover
bun add vue-data-attr-remover
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-11-09 |
| First published | 2018-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 55.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Damian Stasik |
| Maintainers | visualfanatic |
| Keywords | vue, vue-template-compiler, vue-loader |

## Links

- npm: https://www.npmjs.com/package/vue-data-attr-remover
- Repository: https://github.com/visualfanatic/vue-data-attr-remover
- Homepage: https://github.com/visualfanatic/vue-data-attr-remover#readme
- Issues: https://github.com/visualfanatic/vue-data-attr-remover/issues
- npm.io page: https://npm.io/package/vue-data-attr-remover

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-11-09

## README

<h1 align="center">vue-data-attr-remover</h1>
<p align="center">Vue compiler module that allows you to easily remove <code>data-*</code> attributes</p>

## Instalation
``` bash
npm i -D vue-data-attr-remover

yarn add --dev vue-data-attr-remover
```

## Usage
### `vue.config.js`
```js
const dataAttrRemover = require('vue-data-attr-remover');

module.exports = {
  chainWebpack(config) {
    config.module
      .rule('vue')
      .use('vue-loader')
      .tap((options) => {
        const { compilerOptions } = options;
        const { modules = [] } = compilerOptions;

        modules.push(dataAttrRemover());

        compilerOptions.modules = modules;
        options.compilerOptions = compilerOptions;

        return options;
      });
  }
};

```

### `webpack.config.js`
```js
const dataAttrRemover = require('vue-data-attr-remover');

module.exports = {
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: {
          compilerOptions: {
            modules: [
              dataAttrRemover(),
            ],
          },
        },
      },
    ],
  },
};
```

## API

| Name                | Type       | Default value                                 |
|---------------------|------------|-----------------------------------------------|
| `condition`         | `Function` | `() => process.env.NODE_ENV === 'production'` |
| `onlyExactAttrName` | `Boolean`  | `true`                                        |
| `attrNameSuffix`    | `String`   | `'test'`                                      |

---
_Source: https://npm.io/package/vue-data-attr-remover · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
