1.3.6 'isBuffer is not a function' when minified
See original GitHub issueI’m encountering an issue which only occurs on a uglified/minified production build, and only with version 1.3.6. Version 1.3.5 works great.
I’ve traced it down to a clone
function in quill.core.js in the 1.3.6 build which dies on line 3948.
} else if (useBuffer && Buffer.isBuffer(parent)) {
in the minified code it looks like:
else { if (m && t.isBuffer(r))
with the error Uncaught TypeError: t.isBuffer is not a function
Now, I’m not entirely sure what the deal is! This is on a large project, with a bunch of dependencies, and this latest update of 1.3.6 is the only thing that has an issue. If I roll back to 1.3.5, everything works. It doesn’t look like this area of code was touched at all according to the change log either.
There are no compile errors at all! The only reason I found this was a few customer emails saying that things died when they open up the rich text editor.
Any suggestions?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (3 by maintainers)
I had the same problem with my production bundle, and none of the previous recommendations has helped to solve it.
So I ended up with using the default UglifyJS plugin and setting the “reduce_vars” flag in the options to false:
Package versions I used:
It’s worked for me, hope it will help.
All the info is in the second sentence of the readme: “webpack =< v3.0.0 currently contains v0.4.6 of this plugin under webpack.optimize.UglifyJsPlugin as an alias. For usage of the latest version (v1.0.0), please follow the instructions below”
edit: the “conditionals” flag in UglifyJS seems to be the root cause of the issue if people don’t want to update. But then that removes that conditional optimization feature for every one of your dependancies, just to work around Quill > 1.3.5