@@ -6,7 +6,6 @@ import { dirname, resolve } from 'node:path'
66import { fileURLToPath } from 'node:url'
77import { SKIP_COMMENT_RE } from '#integration/constants'
88import { BetterMap , CountableSet } from '@unocss/core'
9- import { bold , cyan , green } from 'colorette'
109import gzipSize from 'gzip-size'
1110import sirv from 'sirv'
1211import { analyzer } from './analyzer'
@@ -110,27 +109,6 @@ export default function UnocssInspector(ctx: UnocssPluginContext): Plugin {
110109
111110 next ( )
112111 } )
113-
114- const _printUrls = server . printUrls
115- const colorUrl = ( url : string ) =>
116- cyan ( url . replace ( / : ( \d + ) \/ / , ( _ , port ) => `:${ bold ( port ) } /` ) )
117-
118- server . printUrls = ( ) => {
119- _printUrls ( )
120- for ( const localUrl of server . resolvedUrls ?. local ?? [ ] ) {
121- // server.config.base will be normalized with leading and trailing slashes,
122- // but localUrl might not have a trailing slash
123- const appUrl = localUrl . endsWith ( '/' ) ? localUrl : `${ localUrl } /`
124- // remove the base path from appUrl if possible
125- const serverUrl = server . config . base && appUrl . endsWith ( server . config . base )
126- ? appUrl . slice ( 0 , - server . config . base . length )
127- : appUrl . slice ( 0 , - 1 ) // remove the trailing slash
128- // we removed the trailing slash from serverUrl when removing the base, add it back
129- const inspectorUrl = `${ serverUrl } /${ baseUrl } /`
130- // eslint-disable-next-line no-console
131- console . log ( ` ${ green ( '➜' ) } ${ bold ( 'UnoCSS Inspector' ) } : ${ colorUrl ( `${ inspectorUrl } ` ) } ` )
132- }
133- }
134112 }
135113
136114 return {
0 commit comments