setTimeout and setInterval will be executed during build #3977
Unanswered
hahaxiaowai
asked this question in
Q&A
Replies: 1 comment
-
run them inside onMounted hook / inBrowser check if you don't want to run them during SSR, or wrap your component with ClientOnly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use custom component in vitepress, when I use
inteval
,it will be exceuted during build.this my code
import
use
Test.vue
build, and will not stop, why?
![image](https://private-user-images.githubusercontent.com/49934348/341963928-ebfa4b7b-4f77-4752-a939-f980941f76a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNjk2NTgsIm5iZiI6MTcyNTA2OTM1OCwicGF0aCI6Ii80OTkzNDM0OC8zNDE5NjM5MjgtZWJmYTRiN2ItNGY3Ny00NzUyLWE5MzktZjk4MDk0MWY3NmE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDAxNTU1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlZTQ5NzhlNGY3MTYyYzgzMmU0MTUzMTkxY2Q1MjFiMTY1MjA2ODUyMzFhN2VlMTI5YWNkZDU0MjkwNjQ0N2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zI3ESkhP5tJXegJzn2aBdfvoqujpTzswXssJZRMATIw)
Beta Was this translation helpful? Give feedback.
All reactions