File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/start/src/config Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -243,8 +243,9 @@ export function solidStart(options?: SolidStartOptions): Array<PluginOption> {
243243 {
244244 name : "solid-start:capture-client-bundle" ,
245245 enforce : "post" ,
246- generateBundle ( _options , bundle ) {
246+ generateBundle ( options , bundle ) {
247247 globalThis . START_CLIENT_BUNDLE = bundle ;
248+ ( globalThis as any ) . START_CLIENT_OUT_DIR = options . dir ;
248249 } ,
249250 } ,
250251 devServer ( ) ,
Original file line number Diff line number Diff line change @@ -62,7 +62,15 @@ export function manifest(start: SolidStartOptions): PluginOption {
6262 const path = await import ( "node:path" ) ;
6363 try {
6464 const appRoot = ( start as any ) . appRoot || "./src" ;
65- const manifestPath = path . resolve ( appRoot , ".." , ".solid-start/client/.vite/manifest.json" ) ;
65+ let outDir = ".solid-start/client" ;
66+ if ( devServer ?. environments ?. client ?. config ?. build ?. outDir ) {
67+ outDir = devServer . environments . client . config . build . outDir ;
68+ } else if ( this . environment ?. config ?. build ?. outDir && this . environment ?. config ?. consumer === "client" ) {
69+ outDir = this . environment . config . build . outDir ;
70+ } else if ( ( globalThis as any ) . START_CLIENT_OUT_DIR ) {
71+ outDir = ( globalThis as any ) . START_CLIENT_OUT_DIR ;
72+ }
73+ const manifestPath = path . resolve ( appRoot , ".." , outDir , ".vite/manifest.json" ) ;
6674 rawManifest = fs . readFileSync ( manifestPath , "utf-8" ) ;
6775 } catch ( e ) {
6876 throw new Error ( `Manifest asset not found in bundle and could not be read from disk. Keys: ${ Object . keys ( globalThis . START_CLIENT_BUNDLE ) . join ( ", " ) } . Error: ${ e } ` ) ;
You can’t perform that action at this time.
0 commit comments