Skip to content

Conversation

@intellix
Copy link
Contributor

@intellix intellix commented Nov 13, 2025

What is it?

  • Bug

Description

Removed doubling of assetsDir during bundle close when delivering staticPaths list: #8151

All info in the linked issue but I'll repeat a little how this is broken.

Vite config:

build: {
  assetsDir: 'q',
},

Now if you look at the list of generated staticPaths, you'll see these:

  • /q/robots.txt
  • /q/q/build/abc-123.js
  • /q/q/build/def-456.js

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

@intellix intellix requested a review from a team as a code owner November 13, 2025 12:55
@changeset-bot
Copy link

changeset-bot bot commented Nov 13, 2025

🦋 Changeset detected

Latest commit: e21c487

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@builder.io/qwik-city Minor
eslint-plugin-qwik Minor
@builder.io/qwik Minor
create-qwik Minor
@builder.io/qwik-react Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@intellix intellix force-pushed the v1-assets-dir-static-files branch from e6b92df to 9299762 Compare November 13, 2025 12:55
@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview e21c487

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 13, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@builder.io/qwik@8152
npm i https://pkg.pr.new/@builder.io/qwik-city@8152
npm i https://pkg.pr.new/eslint-plugin-qwik@8152
npm i https://pkg.pr.new/create-qwik@8152

commit: 9299762

@intellix
Copy link
Contributor Author

I am noticing one thing locally and that's sounds imported via ?url suffix aren't working correctly but I think that's a Vite thing, even on the latest. I'll test with/without this fix as well just to be sure.

The mp3 is loaded relative to the component like so:

import click from './click.mp3?url';

On a local serve, it loads correctly. On preview/build, the file is sent to /q/assets/AbC-dEf123-click.mp3 but the code tries to load it without the /q/ prefix.

@intellix
Copy link
Contributor Author

The mp3 issue isn't fixed by removing my patch. I guess it's unrelated as the assetsDir in my PR is only used for generating the staticPaths. I'm not sure if it's a vite or qwik thing but I'll investigate in a separate reproduction

@intellix intellix marked this pull request as draft November 20, 2025 17:19
@intellix intellix force-pushed the v1-assets-dir-static-files branch from 9299762 to 193b0ed Compare November 20, 2025 17:30
@intellix intellix marked this pull request as ready for review November 20, 2025 17:30
@intellix intellix changed the title fix(qwik-city): remove double assetsDir on bundle close of staticPaths fix(qwik-city): remove doubling of assetDir on postBuild Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants