1.0.6 • Published 4 years ago

typescript-transformer-jsx-remove-attributes v1.0.6

Weekly downloads
236
License
MIT
Repository
github
Last release
4 years ago

typescript-transformer-jsx-remove-attributes

This transformer allows you to remove one or many jsx attributes during compile time. It can be useful if you want to remove e.g. data-testid attribute.

How to use?

You could use it with webpack and ts-loader like that:

  1. First import transformer e.g. const { removeJsxAttributesTransformer } = require('typescript-transformer-jsx-remove-attributes');
  2. After that, modify your ts-loader configuration:
 {
    test: /\.(ts|tsx)$/,
    loader: 'ts-loader',
    options: {
        getCustomTransformers: () => ({ before: [removeJsxAttributesTransformer(['data-testid', /* any other attribute */])] })
    }
}
1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago