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: customize outdir #125

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions apps/astro-demo/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export default defineConfig({
adapter: node({
mode: "standalone"
}),

integrations: [qwik({ include: "**/qwik/*" }), react({ include: "**/react/*" })]
integrations: [qwik({ include: "**/qwik/*" }), react({ include: "**/react/*" })],
outDir: "my-project"
});
11 changes: 7 additions & 4 deletions libs/qwikdev-astro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,21 @@ export default defineIntegration({
entrypoints = getQwikEntrypoints(srcDir, filter);

if ((await entrypoints).length !== 0) {
distDir = astroConfig.outDir.pathname;
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);
}

console.log("DIST DIR", distDir);

updateConfig({
vite: {
build: {
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: "my-project"
},
ssr: {
input: resolve("../server.ts")
Expand Down