The old CSG class was made of pure JS (it was a port from GitHub - evanw/csg.js: Constructive solid geometry on meshes using BSP trees in JavaScript) and while it served us, it was not maintained and not usable anymore. We are now encouraging everyone to switch the new CSG2 class.
How to port:
Babylon.js Breaking Changes | Babylon.js Documentation