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

fix(optimizer): retain relative paths in extracted code #6326

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

wmertens
Copy link
Member

@wmertens wmertens commented May 16, 2024

fixes imports-of-imports (#5473) properly and has some other small fixes

I had a bigger PR that also removed prebuilding and entries but I am running into trouble with it, so I'm first merging the small stuff.

Copy link

netlify bot commented May 16, 2024

Deploy Preview for qwik-insights failed.

Name Link
🔨 Latest commit a52d79e
🔍 Latest deploy log https://app.netlify.com/sites/qwik-insights/deploys/665e006a21c67400087e0fd1

Copy link

cloudflare-pages bot commented May 16, 2024

Deploying qwik-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a52d79e
Status:🚫  Build failed.

View logs

@wmertens wmertens force-pushed the hooks-relative-paths branch 2 times, most recently from e9bda50 to c412f9c Compare May 16, 2024 13:02
@shairez
Copy link
Collaborator

shairez commented May 17, 2024

This fixes this issue right?
#5473

@wmertens wmertens force-pushed the hooks-relative-paths branch 3 times, most recently from 4a2bd34 to c3f2444 Compare May 20, 2024 16:13
@wmertens wmertens enabled auto-merge (rebase) May 20, 2024 16:28
@wmertens wmertens disabled auto-merge May 20, 2024 22:10
@wmertens wmertens force-pushed the hooks-relative-paths branch 5 times, most recently from 60a0b16 to a8d3e57 Compare May 24, 2024 21:00
@wmertens wmertens requested a review from mhevery May 24, 2024 21:04
@wmertens wmertens requested review from a team as code owners May 27, 2024 13:47
@wmertens
Copy link
Member Author

grr the small stuff is also going nowhere. Needs to be the big thing. Work in progress. I need to get dev mode working and then it looks like it will be very very nice

@wmertens wmertens marked this pull request as draft May 28, 2024 14:18
this fixes imports-of-imports and is also nicer for debugging
@wmertens wmertens force-pushed the hooks-relative-paths branch 3 times, most recently from cced13c to e905d33 Compare May 30, 2024 13:06
+ remove import-of-import workaround

Transforming breaks other vite plugins, slows down dev start and might transform more than needed
The bundler should handle entries. Prefetching can still indicate the full graph to fetch and http2 makes that fast.
Now the bundler can decide which QRLs to host toghether.

- chunk URLs now can include the exported attr as `chunk#attr`
- manifest generation is now more robust
- refactored manifest generation
needs to support the absolute path and ?qrl= query
- support vite base
- build qrls on demand
wmertens and others added 5 commits June 1, 2024 09:08
@@ -102,10 +102,12 @@ export const qwikLoader = (
for (const qrl of attrValue.split('\n')) {
const url = new URL(qrl, base);
const href = url.href;
const symbol = url.hash[replace](/^#?([^?[|]*).*$/, '$1') || 'default';
const match = /^#?(([^#]+)#)?([^?[|]*).*$/.exec(url.hash);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add regexp online editor link. for example https://regexr.com/ lets you also add regexp tests for example https://regexr.com/816es (don't use mine we should make a qwik account with all them saved

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.

None yet

3 participants