[solved] Slider won't work on production build

Hello,

I’ve started introducing vuejs into a project (slowly replacing jquery code), and have managed to get some things in place.

But I have an issue with a slider that stopped working in production builds when I begun adding other components (code with issue is available here : https://github.com/kermorgant/slider-issue).

It still works in dev, but not with a production build.

Despite my searches, I’ve not found what could be the cause of this, so I put up a repository reproducing the issue here if someone among could maybe spot the problem.

Thanks in advance,
Mikael

Actually your code can be built correctly with npm run build. My suggestion would be remove your node_modules folder, and re-run npm install.

Thanks for trying but it’s not the build that fails, it’s the slider on web/index.html that stops working after building for production. As you write about it, I suspect you only runned npm build.

Regards
Mikael

Yes, you are right, I just ran the npm build…
:joy:Didn’t fully understand your problem before, sorry about that…

No worry, thanks anyway for the time :slight_smile:

Besides, if someone has a suggestion for a slider for my front page, I’d be glad to hear about it.

After second look, the issue comes from css not being imported from the file /_assets/js/components/slider.vue, which is then probably more of a webpack issue (but still unresolved)

hmm, logic issue from my side…

1 Like

have you found a way to resolve this issue? I’m also workin with vue sliderin vue3, but it’s not working on production build

I’m also facing this problem vue3-carousel slider not working in production mode.