Open stavros-k opened 6 months ago
Hey @stavros-k! Tried reproducing and perhaps some user error on my part 🤔 . Could you make a minimal reproduction of the issue?
Okay, I've narrowed it down.
Create a new Astro project, and add qwik integration.
Create a Demo.tsx in src/components/qwik/Demo.tsx
Add a simple counter component.
This does not work
qwikdev({
include: "**/qwik/*",
}),
This work
qwikdev({
include: "",
}),
If you still can reproduce, let me know where I can send you a zip!
Thanks
Gonna dive in and see what's going on here in a bit 😄 .
If you'd like to take a stab at the fix, or play around with the integration, I've written a contributing guide. Let me know if anything isn't clear!
Also side note @stavros-k would suggest updating to the latest version, had a major fix to slots.
What I've tried so far is ensuring the directory exists with fsExtra.ensureDir(distDir)
This seems to get it to work with a static build, but not when the output is server 🤔
server error:
Cannot find module '/home/jackshelton/dev/open-source/astro/qwikdev-astro/apps/astro-demo/my-project/dist/server/manifest_lgZETu9y.mjs' imported from /home/jackshelton/dev/open-source/astro/qwikdev-astro/node_modules/.pnpm/astro@4.5.2/node_modules/astro/dist/core/build/pipeline.js
Stack trace:
at finalizeResolution (node:internal/modules/esm/resolve:255:11)
at defaultResolve (node:internal/modules/esm/resolve:1121:11)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.import (node:internal/modules/esm/loader:328:34)
at importModuleDynamicallyCallback (node:internal/modules/esm/utils:176:14)
Ok I got something working with:
https://github.com/QwikDev/astro/commit/6addd0695d4fec896431dfa15f7815169ff6f8e9
Before we can try it, we need to figure out how to setup changesets snapshot releases, because changes to the build such as this can cause regressions.
I am also hoping to have a test suite here soon that would prevent that as well.
We have an action here that was grabbed from the Astro repo for the most part. https://github.com/QwikDev/astro/blob/main/.github/workflows/snapshot-release.yml
But doesn't seem to be working when I try to run the action, or make a new PR.
If you'd like to take a shot at getting that working that'd be awesome. Happy to figure it out in a couple days and setup a snapshot release if you can't.
Hey, I'll try to test it asap and let you know!
As for the workflow not working, I think its because its "restricted" to PullRequests (https://github.com/QwikDev/astro/blob/95d9c16b0484aa040442a0b27cff4ea2230dbc05/.github/workflows/snapshot-release.yml#L18)
You probably need some other ||
condition to also allow workflow_dispatch.
I couldn't find anything with a quick look, but you can probably print the github object and see for your self whats avaiable! (Link on how to do that)
https://github.com/orgs/community/discussions/27058#discussioncomment-3254474
6addd06
That seems to work!
What I've tried so far is ensuring the directory exists with
fsExtra.ensureDir(distDir)
I also followed this track but I noticed that it only ensures the existence of the temporary directory and not on the output directory.
Hey @stavros-k. we're making a community effort to get everything setup so that we can start making safe changes to the build process, including the merging of this PR. Thanks for waiting! Here's the issue https://github.com/QwikDev/astro/issues/82
When I have an outDir different than the default (
dist
) build fails with(Yes stack trace is empty!)
If I
mkdir build
and run build again, it works fine. Also if I change back theoutDir
todist
it also works file even if dist is missing.Side note: Not sure if this is expected, when I build (after the
mkdir build
) I can still see adist
dir created, including qwik artifacts. I suppose those are generated there before moved to the actualoutDir
? If that's the case, might be a good idea to use thecacheDir
(by defaultnode_modules/.astro
) so CI's can also cache this easierVersions:
Thanks for the integration!!