I believe you can still do this in Next.js with some extra work to exclude the JS bundle. For example, you can use a custom `_document` page and exclude the `NextScript` component [1]. It would be nice if this was supported as a first-class concept, though.
[1] https://nextjs.org/docs/advanced-features/custom-document