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: Build fails when outDir (other than the default) does not exist #126

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions libs/qwikdev-astro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ export default defineIntegration({
entrypoints = getQwikEntrypoints(srcDir, filter);

if ((await entrypoints).length !== 0) {
// Update the global dist directory
distDir = astroConfig.outDir.pathname;
console.log("distDir", distDir);
await fsExtra.ensureDir(distDir);

addRenderer({
name: "@qwikdev/astro",
serverEntrypoint: resolve("../server.ts")
});

// Update the global dist directory
distDir = astroConfig.outDir.pathname;

// checks all windows platforms and removes drive ex: C:\\
if (os.platform() === "win32") {
distDir = distDir.substring(3);
Expand Down Expand Up @@ -124,7 +126,8 @@ export default defineIntegration({
all of the entry points to the application so
that we can generate the manifest.
*/
input: await entrypoints
input: await entrypoints,
outDir: "test"
},
ssr: {
input: resolve("../server.ts")
Expand Down Expand Up @@ -157,6 +160,9 @@ export default defineIntegration({
// make sure vite does not parse .astro files
await build({
...astroConfig?.vite,
build: {
outDir: distDir
},
plugins: [
...(astroConfig?.vite.plugins || []),
{
Expand Down
Loading