soixantecircuits/idle-vue

Not working when deployed to server. Anyone has this issue?

Opened this issue · 4 comments

Hello. Is there anyone of here have this issue where idle-vue works great in localhost but not in server? Thanks.

I'm using Vite. Sad. :(

hello,

idle-vue is a client side plugin. Not sure why you faced issue related to server. Any code to reproduce ?

Same issue. It's stopped completly working from the time I migrated from vue-cli/webpack to "vite".

This solution works for me:

npm install / build and that's it!

I do not know the exact source of the problem but that solved it!

Same issue here. We also switched to Vite and this stopped working completely. Our use case was simple so I just replaced this package with a simple @mousemove watcher with timeout to set user back to idle.

     mouseMove() {

            if (this.lastMouseMoveTimeout) clearTimeout(this.lastMouseMoveTimeout)

            if (this.userIdle) this.setUserActive();

            this.lastMouseMoveTimeout = setTimeout(() => {
                this.setUserIdle();
            }, 1000 * USER_IDLE_SECONDS)
        },