Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When building with --base config.json is still requested from / #1206

Closed
Laikulo opened this issue Oct 10, 2023 · 2 comments
Closed

When building with --base config.json is still requested from / #1206

Laikulo opened this issue Oct 10, 2023 · 2 comments
Labels
FR - Enhancement New feature or request
Milestone

Comments

@Laikulo
Copy link

Laikulo commented Oct 10, 2023

Fluidd Version

gca3abf34

Browser

Firefox

Device

Laptop

Operating System

Linux

What happened

After building fluid with npm run build -- --base=/fluidd/ and installing the resultant dist at /fluidd/ on an httpd, fluidd failed to load.
Investigation determined that fluidd was requesting config.json from /.

Workaround: Configure httpd to respond to /config.json with the file at /fluidd/config.json

What did you expect to happen

Fluidd should request the config bundle from the base url if one is specified.

How to reproduce

  1. npm ci
  2. npm run build -- --base=/fluidd/
  3. cp dist/* -r /srv/www/htdocs/fluidd
  4. firefox http://localhost/fluidd/

Additional information

No response

@Laikulo Laikulo added GH - Bug Something isn't working GH - Evaluation Needed This topic needs to be discussed to evaluate it's aspects and feasability labels Oct 10, 2023
@pedrolamas pedrolamas removed the GH - Evaluation Needed This topic needs to be discussed to evaluate it's aspects and feasability label Oct 10, 2023
@pedrolamas
Copy link
Member

pedrolamas commented Oct 10, 2023

#1207 partially fixed this, as in it will allow building with the --base parameter, and the app should be usable.

However, the service worker will not work correctly as the default generateSW strategy requires all paths to account to the base path change (it does not automatically change those) and changing to injectManifest will open a can of worm that at the moment I don't think it is worth it...

This is an unsupported scenario for us (hence why you had to build it manually), so I've changed the ticket from Bug to Feature Request.

@pedrolamas pedrolamas added FR - Enhancement New feature or request and removed GH - Bug Something isn't working labels Oct 10, 2023
@pedrolamas
Copy link
Member

With the changes in d5c3b9a, we now have a custom service worker that should work fine with --base parameter, so this ticket is now complete!

@pedrolamas pedrolamas added this to the 1.26 milestone Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants