babel-minify-webpack-plugin icon indicating copy to clipboard operation
babel-minify-webpack-plugin copied to clipboard

In README it is said “falsy value to remove all comments”. Not quite true

Open Juribiyan opened this issue 8 years ago • 2 comments

I have set {comments: null} (just a personal preference, null is a falsy value) in PluginOpts and it broke my build with the ERROR in unknown: Cannot read property 'test' of null. I was confused for quite some time untill I guessed to set comments explicitly to false and it worked.

Juribiyan avatar Oct 25 '17 21:10 Juribiyan

Thanks. Good catch.

typeof null === object. So it applies a .test call thinking it's a regex. Would you like to send a PR?

boopathi avatar Oct 25 '17 21:10 boopathi

@boopathi can I take this up?

ad1992 avatar Sep 23 '18 06:09 ad1992