webpack-contrib / babel-minify-webpack-plugin

[DEPRECATED] Babel Minify Webpack Plugin
MIT License
493 stars 44 forks source link

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

Open Juribiyan opened 6 years ago

Juribiyan commented 6 years ago

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.

boopathi commented 6 years ago

Thanks. Good catch.

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

ad1992 commented 5 years ago

@boopathi can I take this up?