-
In the browser environment can I know whether it is currently development or production env? e.g: // theme/index.ts
export default {
setup() {
if (typeof document !== 'undefined') {
if (production)
// do somthing
else
// do somthing DEBUG
}
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
brc-dd
Jul 8, 2023
Replies: 1 comment
-
Try |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Zhengqbbb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try
import.meta.env.MODE
orimport.meta.env.PROD
orimport.meta.env.DEV
?