Tweened function not working after deployed to netlify

As you can see there is sunglass which should be animated and would go into my head also its a cube so it shoud rotate on wheel.

I just picked up svelte too and wanted to deploy my app. In local its working fine.
This is not the whole code but the problem should be somewhere around here.

Edit: no js calls are happening on my deployed app maybe thats the problem not sure how to fix tho

const rotation = tweened({x: 0, y: 0}, {
    duration: 1000,
    easing: cubicOut

const glass = tweened(0, {
    duration: 2000,
    easing: cubicOut

onMount(() => {
    addEventListener("wheel", (event) => {
        if (checkScrollDirectionIsUp(event)) {
            if (currentStateIndex === 0) return rotateCubeToSide(5);
            rotateCubeToSide(currentStateIndex - 1);
        } else {
            if (currentStateIndex === 5) return rotateCubeToSide(0);
            rotateCubeToSide(currentStateIndex + 1);
    setTimeout(() => {
        $glass = 160;
    }, 200)

function checkScrollDirectionIsUp(event) {
    if (event.wheelDelta) {
        return event.wheelDelta > 0;
    return event.deltaY < 0;

function rotateCubeToSide(stateIndex) {
    currentStateIndex = stateIndex;
    $rotation = cubeStates[stateIndex];

<div class="cube" style="transform: rotateY({$rotation.y}deg) rotateX({$rotation.x}deg);">

            <img alt="glass" class="glass" src={Glass} style="top: {$glass}px">

@tisamo There’s both no reference to a JavaScript file, or inline JavaScript in the HTML file that you’ve linked to.

You should run your build command locally, (not your development command), then check the output to see what’s occuring.

It’s highly likely that your build is configured to do something different from development, hence why you say “In local its working fine”.