cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.98k stars 257 forks source link

Can't install on a subdir anymore #1843

Closed Salamandar closed 3 months ago

Salamandar commented 4 months ago

Describe the bug

The original issue was fixed here: https://github.com/cinnyapp/cinny/pull/1094/files

But is was broken again here : https://github.com/cinnyapp/cinny/blob/44161c4157dccac383025825f5fd4d7f4620ea67/build.config.ts

Would it be possible (not sure it's compatible with url nav though) to put back base = "" to allow installation in a subdir? Thanks !

Reproduction

Expected behavior

Pages load

Platform and versions

Cinny version : v4.0

Additional context

No response

ajbura commented 4 months ago

App requires base url ahead of build so app can locate it's config file with base url, otherwise config file need to be placed at the root of domain which might not be possible and can be complicated with file name collision. also we can't put relative path for assets as app now have url navigation and relative path will resolved relative to current url which is not always app base url

ajbura commented 4 months ago

To deploy it on subdir you have to build the app after changing base in build.confg.ts file

kfiven commented 3 months ago

Closing as explained above. To deploy on subdir app needs to be rebuilt after changing the build.config.

Salamandar commented 3 months ago

Considering Cinny requires ~5GB of RAM to build (See https://github.com/vitejs/vite/issues/2433), we can't consider rebuilding cinny on things like raspberry pis…

kfiven commented 3 months ago

but the issue is we can't provide a prebuilt tar or something because the subfir for each people could be different, so there do not seems to be any other option here.

kfiven commented 3 months ago

seems a downside of having the URL routing now, but it is what it is.

oleole39 commented 2 weeks ago

also we can't put relative path for assets as app now have url navigation and relative path will resolved relative to current url which is not always app base url

Do you mean we could not have default build.config.ts as:

export default {
  base: './',
};

instead of :

export default {
  base: '/',
};

I don't really understand the URL navigation point mentioned here, but I've done a quick test modifying path from absolute to relative in 2 files of the prebuilt release archive and it seemed to work.

oleole39 commented 2 weeks ago

I've done a quick test modifying path from absolute to relative in 2 files of the prebuilt release archive and it seemed to work.

Hmm actually not, forget it.