1- import { PluginOption , ViteDevServer } from "vite" ;
1+ import { type PluginOption , type ViteDevServer } from "vite" ;
22
33import { findStylesInModuleGraph } from "../server/collect-styles.ts" ;
44import { VIRTUAL_MODULES } from "./constants.ts" ;
5- import { SolidStartOptions } from "./index.ts" ;
5+ import { type SolidStartOptions } from "./index.ts" ;
66
77export function manifest ( start : SolidStartOptions ) : PluginOption {
88 let devServer : ViteDevServer = undefined ! ;
9- return {
9+ return {
1010 name : "solid-start:manifest-plugin" ,
1111 enforce : "pre" ,
1212 configureServer ( server ) { devServer = server } ,
@@ -21,13 +21,13 @@ export function manifest(start: SolidStartOptions): PluginOption {
2121 if ( id === VIRTUAL_MODULES . getManifest ) {
2222 return this . environment . config . consumer === "client"
2323 ? this . resolve (
24- new URL ( "../server/manifest/client-manifest" , import . meta. url )
25- . pathname ,
26- )
24+ new URL ( "../server/manifest/client-manifest" , import . meta. url )
25+ . pathname ,
26+ )
2727 : this . resolve (
28- new URL ( "../server/manifest/ssr-manifest" , import . meta. url )
29- . pathname ,
30- ) ;
28+ new URL ( "../server/manifest/ssr-manifest" , import . meta. url )
29+ . pathname ,
30+ ) ;
3131 }
3232 if ( id === VIRTUAL_MODULES . middleware ) {
3333 if ( start . middleware ) return await this . resolve ( start . middleware ) ;
@@ -53,10 +53,10 @@ export function manifest(start: SolidStartOptions): PluginOption {
5353 } else if ( id === `\0${ VIRTUAL_MODULES . middleware } ` )
5454 return "export default {};" ;
5555 else if ( id . startsWith ( "/@manifest" ) ) {
56- if ( this . environment . mode !== "dev" ) throw new Error ( "@manifest queries are only allowed in dev" ) ;
56+ if ( this . environment . mode !== "dev" ) throw new Error ( "@manifest queries are only allowed in dev" ) ;
5757
5858 const [ path , query ] = id . split ( "?" ) ;
59- const target = id . split ( "/" ) [ 2 ] ! ;
59+ const target = id . split ( "/" ) [ 2 ] ! ;
6060 const params = new URLSearchParams ( query ) ;
6161 if ( ! path || ! query ) return ;
6262 if ( path . endsWith ( "assets" ) ) {
0 commit comments