Is it possible to build an app using Svelte frontend instead of vue?

Hello, I’m just trying to deliver an already compiled version of a Svelte based web application in my nextcloud app.
I don’t really like frontend coding, but I’m used to Svelte and would like to bring my application into Nextcloud as an app without rewriting it in vue js.

The svelte app works well as static web app in any webroot. So the idea was just delivering the built version of it, as it consists of only 2 files and will bind itself to the div with id=app.

That’s the content of the php file, that is loaded from my PageController and returned as new TemplateResponse($this->appName, 'spa').

<?php
script('myapp', 'spa/index-588ec808');
style('myapp', 'spa/index-76bfc680');
?>

<div id="app">
</div>

The problem I’m having is that my app doesn’t load the frontend, with this error from my browser dev tools:

Uncaught TypeError: cannot declare global binding '$': property must be configurable or both writable and enumerable
    <anonymous> https://localhost:8443/apps/myapp/js/spa/index-588ec808.js?v=de9efe8b-0:1

Any idea about getting that work? Or are there any references of js (Svelte like) framework based, non-vue apps in nextcloud? (I’m not talking about jquery/angularjs with that question xD)

Honestly, this sounds like your app is not working. Does it bind to $ in some way? There is jquery loaded AFAIK. Maybe this causes some collisions.

I do not get the point of your last paragraph? You want anything except for Vue?

Thanks for your answer, the idea of the jquery collision sounds interesting, I’ll look into it. Svelte uses $ for reactive statements.

Since I previously assumed that vue was the problem, the last paragraph was more of an attempt to find a project in which someone might have already solved the problem. So an app that makes vue (from the rest of the frontend) + another framework possible together.

In general, you can use whatever you see for in the frontend. The other components are written in vite which makes it a rather logical choice. However, you can do what you want. The only thing are some preloaded libraries, that are deprecated ATM for such reasons.