@@ -317,8 +317,6 @@ async function createProjectService(
317317 throw new SilentError ( 'No config file found.' )
318318 }
319319
320- console . log ( `Found Tailwind CSS config file: ${ configPath } ` )
321-
322320 const pnpPath = findUp . sync (
323321 ( dir ) => {
324322 let pnpFile = path . join ( dir , '.pnp.js' )
@@ -359,21 +357,15 @@ async function createProjectService(
359357 try {
360358 const tailwindcssPath = resolveFrom ( configDir , 'tailwindcss' )
361359 const tailwindcssPkgPath = resolveFrom ( configDir , 'tailwindcss/package.json' )
362- const tailwindcssPkg = __non_webpack_require__ ( tailwindcssPkgPath )
363360 const tailwindDir = path . dirname ( tailwindcssPkgPath )
364361
365362 const postcssPath = resolveFrom ( tailwindDir , 'postcss' )
366363 const postcssPkgPath = resolveFrom ( tailwindDir , 'postcss/package.json' )
367364 const postcssDir = path . dirname ( postcssPkgPath )
368365 const postcssSelectorParserPath = resolveFrom ( tailwindDir , 'postcss-selector-parser' )
369366
370- postcss = __non_webpack_require__ ( postcssPath )
371367 postcssVersion = __non_webpack_require__ ( postcssPkgPath ) . version
372- postcssSelectorParser = __non_webpack_require__ ( postcssSelectorParserPath )
373- console . log ( `Loaded postcss v${ postcssVersion } : ${ postcssDir } ` )
374- tailwindcss = __non_webpack_require__ ( tailwindcssPath )
375- tailwindcssVersion = tailwindcssPkg . version
376- console . log ( `Loaded tailwindcss v${ tailwindcssVersion } : ${ tailwindDir } ` )
368+ tailwindcssVersion = __non_webpack_require__ ( tailwindcssPkgPath ) . version
377369
378370 if (
379371 state . enabled &&
@@ -385,6 +377,15 @@ async function createProjectService(
385377 return
386378 }
387379
380+ console . log ( `Found Tailwind CSS config file: ${ configPath } ` )
381+
382+ postcss = __non_webpack_require__ ( postcssPath )
383+ postcssSelectorParser = __non_webpack_require__ ( postcssSelectorParserPath )
384+ console . log ( `Loaded postcss v${ postcssVersion } : ${ postcssDir } ` )
385+
386+ tailwindcss = __non_webpack_require__ ( tailwindcssPath )
387+ console . log ( `Loaded tailwindcss v${ tailwindcssVersion } : ${ tailwindDir } ` )
388+
388389 try {
389390 resolveConfigFn = __non_webpack_require__ ( resolveFrom ( tailwindDir , './resolveConfig.js' ) )
390391 } catch ( _ ) {
0 commit comments