Version 6.0 up:
You can do this in simple way:
const polygon = new Polygon(fabricPoints, {
fill: 'rgba(255, 0, 0, 0.5)',
stroke: 'black',
strokeWidth: 2,
selectable: true,
hasControls: true,
hasBorders: true,
});
polygon.setBoundingBox(); //this will recalculate bounding box