oliviertassinari / babel-plugin-transform-react-remove-prop-types

Remove unnecessary React propTypes from the production build. :balloon:
MIT License
897 stars 61 forks source link

browserify + coffeeify + babelify. propTypes not removed #150

Closed kesha-antonov closed 5 years ago

kesha-antonov commented 6 years ago

Hello!

I have this stack: preact + browserify + coffeeify + babelify

After running

let b = browserify(bundleConfig)
      .transform('coffeeify', {})
      .transform('babelify', {
        presets: [
          "es2015",
          "react"
        ],
        plugins: [
          ["module-resolver", {
            "root": ["."],
            "alias": {
              "react": "preact-compat",
              "react-dom": "preact-compat"
            }
          }],
          ['transform-react-remove-prop-types', {
            classNameMatchers: ['Component', '_Component']
          }],
          'transform-object-assign',
          ["transform-react-jsx", { "pragma":"h" }]
        ],
        extensions: [
          ".coffee",
          ".js"
        ],
        global: true
      })

propTypes are not removed.

Do you have any advice?

oliviertassinari commented 6 years ago

I have no clue. Do you have a reproduction (it's not like I would look at it, but without, nobody else can help)?