ABSTRACT Scalar field dark matter (SFDM) comprised of ultralight bosons has attracted great interest as an alternative to standard, collisionless cold dark matter (CDM) because of its novel structure-formation dynamics, described by the coupled Schrödinger–Poisson equations. In the free-field (‘fuzzy’) limit of SFDM (FDM), structure is inhibited below the de Broglie wavelength, but resembles CDM on larger scales. Virialized haloes have ‘solitonic’ cores of radius ∼λdeB, surrounded by CDM-like envelopes. When a strong enough repulsive self-interaction (SI) is also present, structure can be inhibited below a second length-scale, λSI, with λSI > λdeB – called the Thomas–Fermi (TF) regime. FDM dynamics differ from CDM because of quantum pressure, and SFDM-TF differs further by adding SI pressure. In the small-λdeB limit, however, we can model all three by fluid conservation equations for a compressible, γ = 5/3 ideal gas, with ideal gas pressure sourced by internal velocity dispersion and, for the TF regime, an added SI pressure, PSI ∝ ρ2. We use these fluid equations to simulate halo formation from gravitational collapse in 1D, spherical symmetry, demonstrating for the first time that SFDM-TF haloes form with cores the size of RTF, the radius of an SI-pressure-supported (n = 1)-polytrope, surrounded by CDM-like envelopes. In comparison with rotation curves of dwarf galaxies in the local Universe, SFDM-TF haloes pass the [‘too-big-to-fail’ + ‘cusp–core’]-test if RTF ≳ 1 kpc.