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

[🐞] Q:base Does not take effect in some imports of production environments #4833

Closed
HENGGE1226 opened this issue Jul 20, 2023 · 1 comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@HENGGE1226
Copy link

HENGGE1226 commented Jul 20, 2023

Which component is affected?

Qwik City (routing)

Describe the bug

Usually, We will set the q:base attribute to add the domain name of the cdn to the static resource.
image

However, this q:base property fails when the application preloads some components.
This results in a 404 for some static resources.

image image Please repair as soon as possible Thanks very much !!

Reproduction

https://codesandbox.io/p/sandbox/dreamy-swirles-tn392g?file=%2Fsrc%2Fentry.ssr.tsx%3A30%2C6

Steps to reproduce

  • set the custom base
image
  • npm run build
  • deploy in the serve

System Info

node v16.14.0
npm v8.3.1
"@builder.io/qwik": "^1.2.6",
"@builder.io/qwik-city": "^1.2.6",
"vite": "4.4.0",

Additional Information

No response

@HENGGE1226 HENGGE1226 added TYPE: bug Something isn't working STATUS-1: needs triage New issue which needs to be triaged labels Jul 20, 2023
@PatrickJS
Copy link
Member

base is a property above

export default function (opts: RenderToStreamOptions) f
return renderToStream (<Root />, {
  manifest,
  ...opts,
  base: "https://cdn.com/build", <--- base should be here
  containerAttributes: {
    lang: "en-us"
    ...opts.containerAttributes,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants