File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed
Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @qwikdev/astro " : patch
3+ ---
4+
5+ feat: support global config for renderOpts
6+
7+ You can now pass the ` renderOpts ` option to the ` qwik ` integration to set global render options for all Qwik components.
8+
9+ For example, let's say we wanted to change the base URL for all Qwik build assets on every component used in an Astro file.
10+
11+ ``` ts
12+ import { defineConfig } from " astro/config" ;
13+ import qwik from " @qwikdev/astro" ;
14+
15+ export default defineConfig ({
16+ integrations: [qwik ({ include: " **/qwik/*" , renderOpts: { base: " my-cdn-url/build" } })]
17+ });
18+ ```
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ import qwik from "@qwikdev/astro";
44
55// https://astro.build/config
66export default defineConfig ( {
7- integrations : [ qwik ( { include : "**/qwik/*" , renderOpts : { base : "http://192.168.68.76:4321/build" } } ) ]
7+ integrations : [ qwik ( { include : "**/qwik/*" } ) ]
88} ) ;
Original file line number Diff line number Diff line change @@ -107,11 +107,9 @@ export default defineIntegration({
107107 serverEntrypoint : resolver ( "../server.ts" )
108108 } ) ;
109109
110- if ( options ?. renderOpts ) {
111- defineModule ( 'virtual:qwikdev-astro' , {
112- defaultExport : options . renderOpts ,
113- } ) ;
114- }
110+ defineModule ( 'virtual:qwikdev-astro' , {
111+ defaultExport : options ?. renderOpts ,
112+ } ) ;
115113
116114 /** Relative paths, as the Qwik optimizer handles normalization */
117115 srcDir = getRelativePath ( astroConfig . root . pathname , astroConfig . srcDir . pathname ) ;
You can’t perform that action at this time.
0 commit comments