it depends on what you want to do. if you are using the comp for general feel/tone/squash effect of the guitar, then i would put it before the delay.
but if it is a short delay like a slapback, you can use the comp to tune the ratio of the repeats dying down to the dry more to your liking than the wet/dry knob allows (though this is the beauty of running a delay into the pre of a squishy/edge of breakup amp instead of the fx loop, the amp compresses and evens it out a bit). if your amp is a bit stiff, it can get you closer to that old school slapback + tape saturation sound. at the extreme end you can dial in like 3 or 4 repeats compressed to "unity-enough" (instead of just one) to do rhythmic stuff.
also with old school psych rock runaway tape echo stuff (or an emulation of it, where it degrades after every repeat), a comp after helps to not be so harsh and piercing, or peak too much.
but the end of chain stuff is easier to mess around with in a DAW, where you can just duplicate plugins for free, and save your nice sounding hardware comp for your board/earlier in the chain. i use my comp as double duty - first as a tone/feel shaper before boosting/driving the amp, but I also take advantage of its limiting property after my fuzzes to balance them out (octave fuzzes can get especially harsh on the high end).