Open jianxinliu opened 2 years ago
👋 @jianxinliu
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
I had this morning also this error message. Thanks @jianxinliu for the hint with the skipAutoScale reference.
Workaround: Set skipAutoScale to true.
htmlToImage.toPng(node, { skipAutoScale: true })
I had this morning also this error message. Thanks @jianxinliu for the hint with the skipAutoScale reference.
Workaround: Set skipAutoScale to true.
htmlToImage.toPng(node, { skipAutoScale: true })
Thanks @ctool-lenggi ‘s suggestion. We just change the source code as a temporary solution, but now I'd rather choose yours.
As the source code shows, set skipAutoScale: false
will check width and height of the canvas avoid exceeding the maximum limit of canvas which is 16384 pixels. It is large enough for my project, so i choose set skipAutoScale: true
to avoid reassign to a constant variable after build.
btw, what can i do if my project requires skipAutoScale: false
?
An "typeerror: assignment to constant variable" error occurred after the project was builded with Webpack 3.6.0. While running on the development mode everything is ok.
Additional Context
code after build
source code:
the code after build extract the function
checkCanvasDimensions
as plain code,which is the cause of the problem.dist from npm:
Your Environment
I wonder if this is a bug of Webpack? And What should I do?