-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base
must always end in /build
, which should be a private implementation detail
#1604
Comments
base
must always ends in /build
, which should be a private implementation detailbase
must always end in /build
, which should be a private implementation detail
I am not sure i understand the problem here,
but cant add build automatically, since the moment you take over replacing the default value, we assume you know where the files will be located, and adding build unconditionally to the end makes little sense |
The fact that it ends in build is a default, not a must. |
Currently the fact that it ends in |
This is the point. This is not how it works. Despite allowing me to specify the So alternatively, the build should have a configuration option to override the |
So this is exactly what is happening with i18n (#1594 and https://github.com/mhevery/qwik-i18n) I manually override the In general, I like when the system is as explicit as possible. Magically adding Not sure I understand the motivation here. Why is adding |
The
One could argue that instead it should look like:
|
I see your point, but I would say explicitly is better. So we are unlikely ta change this. But I still don't understand why this is an issue for you. Why is the trailing |
OK. No problem. Just don't change it. OK? |
@petebacondarwin is it open source? |
nice! cloud workers are nice when im online i hope its trivial to switch from cloud workers to web workers (running in my browser) my use case: web-desktop a la OS.js, macos-web, win11React, daedalOS ... see also https://github.com/BuilderIO/qwik/discussions/1382#discussioncomment-4255647
|
Switching from Cloudflare Workers to Web Workers is not that simple. The Cloudflare Workers environment is designed to be more interoperable with Service Workers. For offline mode, I think this is actually what you want anyway? |
Qwik Version
0.9.0
Operating System (or Browser)
Any
Node Version (if applicable)
Any
Which component is affected?
Qwik Optimizer (rust)
Expected Behaviour
When calling
renderToString()
orrenderToStream()
you can specify abase
path.I expect this to be the base path of the application being rendered rather than the path to the client-side files.
Actual Behaviour
Currently the
base
path option must end with/build
so that it points to the output of the Qwik optimizer build.But this seems like an internal implementation detail - especially as it is hard coded into the optimizer.
Additional Information
The context here is writing a micro-frontend that is implemented in Qwik.
Imagine we have a "footer" fragment. We could render this in the server as so:
Since this is a micro-frontend, requests for the client-side JS will be proxied through another end-point and we need to output paths to these files with a prefix that is specific to the fragment to distinguish them from requests for other fragment files.
Ideally I would want to set:
base: "/_fragment/footer"
And let Qwik determine the additional
build
path segment.Note that one might need to do the same with other assets (e.g. images). In all these cases the "base" of the fragment is
/_fragment/footer
. The fact that the Qwik optimizer dumps the clientside files in thebuild
subdirectory is an implementation detail.The text was updated successfully, but these errors were encountered: