@@ -51,7 +51,6 @@ export async function dev() {
5151
5252 if ( config . components . length ) {
5353 console . warn ( automaticClassGenerationMessage ) ;
54- return ;
5554 }
5655
5756 const importedComponentsMap : Record < string , string [ ] > = { } ;
@@ -77,7 +76,7 @@ export async function dev() {
7776 const config = await getConfig ( ) ;
7877 const newClassList = buildClassList ( {
7978 prefix : config . prefix ,
80- components : newImportedComponents ,
79+ components : config . components . length ? config . components : newImportedComponents ,
8180 } ) ;
8281
8382 if ( ! isEqual ( classList , newClassList ) ) {
@@ -92,7 +91,7 @@ export async function dev() {
9291 return excludeDirs . some ( ( dir ) => path . endsWith ( dir ) ) ;
9392 }
9493 if ( stats ?. isFile ( ) ) {
95- return ! [ ".astro" , ".js" , ".jsx" , ".md" , ".mdx" , ".ts" , ".tsx" ] . some ( ( type ) => path . endsWith ( type ) ) ;
94+ return ! [ ".astro" , ".js" , ".jsx" , ".md" , ".mdx" , ".ts" , ".tsx" , configFile ] . some ( ( type ) => path . endsWith ( type ) ) ;
9695 }
9796 return false ;
9897 } ,
@@ -520,6 +519,12 @@ async function generateClassList() {
520519}
521520
522521export async function register ( ) {
522+ const config = await getConfig ( ) ;
523+
524+ if ( config . components . length ) {
525+ console . warn ( automaticClassGenerationMessage ) ;
526+ }
527+
523528 try {
524529 // clean up old process
525530 const pid = await fs . readFile ( `${ outputDir } /${ processIdFile } ` , "utf8" ) ;
@@ -529,13 +534,6 @@ export async function register() {
529534 //
530535 }
531536
532- const config = await getConfig ( ) ;
533-
534- if ( config . components . length ) {
535- console . warn ( automaticClassGenerationMessage ) ;
536- return ;
537- }
538-
539537 try {
540538 // run `flowbite-react dev` in background
541539 const devProcess = spawn ( "flowbite-react" , [ "dev" ] , {
0 commit comments