The page that @Sjlver’s comment links to (https://github.com/conda/conda/issues/4545#issuecomment-616410225) has an answer.
conda env export --from-history
Please note that you need conda >=4.7.12
(released 2019) for --from-history
(though you can use a newer conda to export an environment created with an older one).