@@ -94,16 +94,15 @@ function validate(config, out, user_file) {
9494 const { paths : user_paths } = user_tsconfig . compilerOptions || { } ;
9595
9696 if ( user_paths ) {
97+ /** @type {string[] } */
9798 const lib = user_paths [ '$lib' ] || [ ] ;
99+ /** @type {string[] } */
98100 const lib_ = user_paths [ '$lib/*' ] || [ ] ;
99101
100102 const missing_lib_paths =
101- ! lib . some (
102- ( /** @type {string } */ relative ) => path . resolve ( '.' , relative ) === config . kit . files . lib
103- ) ||
103+ ! lib . some ( ( relative ) => path . resolve ( '.' , relative ) === config . kit . files . lib ) ||
104104 ! lib_ . some (
105- ( /** @type {string } */ relative ) =>
106- path . resolve ( '.' , relative ) === config . kit . files . lib + '/*'
105+ ( relative ) => path . resolve ( '.' , relative ) === path . join ( config . kit . files . lib , '/*' )
107106 ) ;
108107
109108 if ( missing_lib_paths ) {
@@ -112,12 +111,12 @@ function validate(config, out, user_file) {
112111 . bold ( )
113112 . yellow ( `Your compilerOptions.paths in ${ user_file } should include the following:` )
114113 ) ;
115- const relative = path . relative ( '.' , config . kit . files . lib ) ;
114+ const relative = posixify ( path . relative ( '.' , config . kit . files . lib ) ) ;
116115 console . warn ( `{\n "$lib":["${ relative } "],\n "$lib/*":["${ relative } /*"]\n}` ) ;
117116 }
118117 }
119118 } else {
120- let relative = path . relative ( '.' , out ) ;
119+ let relative = posixify ( path . relative ( '.' , out ) ) ;
121120 if ( relative . startsWith ( SVELTE_KIT ) ) relative = './' + relative ;
122121
123122 console . warn (
0 commit comments