@@ -3,7 +3,7 @@ import { createUnplugin } from 'unplugin';
33import { transformAsync } from '@babel/core' ;
44import pluginSyntaxJsx from '@babel/plugin-syntax-jsx' ;
55import pluginSyntaxTypescript from '@babel/plugin-syntax-typescript' ;
6- import { dim , magenta } from 'kleur/colors' ;
6+ import { dim , magenta , bold , cyan } from 'kleur/colors' ;
77import { visitor as legacyVdomVisitor } from './vdom' ;
88import {
99 callExpressionVisitor as reactCallExpressionVisitor ,
@@ -31,10 +31,18 @@ export const intro = () => {
3131 if ( hasIntroRan ) return ;
3232 hasIntroRan = true ;
3333
34+ const tips = [
35+ `use ${ dim ( '// million-ignore' ) } for errors` ,
36+ `use { threshold: ? } to adjust optimization sensitivity (default=0.1)` ,
37+ `use { mute: true } to disable info logs` ,
38+ ] ;
39+
3440 // eslint-disable-next-line no-console
35- console . log ( `\n ${ magenta ( `⚡ Million.js ${ process . env . VERSION || '' } ` ) }
36- - Tip: use ${ dim ( '// million-ignore' ) } for errors
37- - Hotline: https://million.dev/hotline\n` ) ;
41+ console . log ( `\n ${ bold (
42+ magenta ( `⚡ Million.js ${ process . env . VERSION || '' } ` ) ,
43+ ) }
44+ - Tip: ${ tips [ Math . floor ( Math . random ( ) * tips . length ) ] as string }
45+ - Hotline: ${ cyan ( 'https://million.dev/hotline' ) } \n` ) ;
3846} ;
3947
4048export const unplugin = createUnplugin ( ( options : Options ) => {
0 commit comments