To minimize the function \( f(x) = x^{-x} e^x \), we take the first derivative of the function with respect to \( x \):
\[
f'(x) = \frac{d}{dx}\left( x^{-x} e^x \right)
\]
By applying logarithmic differentiation and simplifying, we find that the critical point occurs at \( x = e \), which minimizes the function. Hence, the value of \( x \) that minimizes the function is \( x = e \).