1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
diff --git a/src/server.ts b/src/server.ts
index 8ff0e722cb69f52c3ef8f02d1a27b75cb5c3c33b..0a928f527f0cadbe8419bef46fd8e648818a989e 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -317,8 +317,6 @@ if (!configPath) {
throw new SilentError('No config file found.')
}
- console.log(`Found Tailwind CSS config file: ${configPath}`)
-
const pnpPath = findUp.sync(
(dir) => {
let pnpFile = path.join(dir, '.pnp.js')
@@ -359,7 +357,6 @@
try {
const tailwindcssPath = resolveFrom(configDir, 'tailwindcss')
const tailwindcssPkgPath = resolveFrom(configDir, 'tailwindcss/package.json')
- const tailwindcssPkg = __non_webpack_require__(tailwindcssPkgPath)
const tailwindDir = path.dirname(tailwindcssPkgPath)
const postcssPath = resolveFrom(tailwindDir, 'postcss')
@@ -367,13 +364,8 @@ const postcssPkgPath = resolveFrom(tailwindDir, 'postcss/package.json')
const postcssDir = path.dirname(postcssPkgPath)
const postcssSelectorParserPath = resolveFrom(tailwindDir, 'postcss-selector-parser')
- postcss = __non_webpack_require__(postcssPath)
postcssVersion = __non_webpack_require__(postcssPkgPath).version
- postcssSelectorParser = __non_webpack_require__(postcssSelectorParserPath)
- console.log(`Loaded postcss v${postcssVersion}: ${postcssDir}`)
- tailwindcss = __non_webpack_require__(tailwindcssPath)
- tailwindcssVersion = tailwindcssPkg.version
- console.log(`Loaded tailwindcss v${tailwindcssVersion}: ${tailwindDir}`)
+ tailwindcssVersion = __non_webpack_require__(tailwindcssPkgPath).version
if (
state.enabled &&
@@ -384,6 +376,15 @@ configId === state.configId
) {
return
}
+
+ console.log(`Found Tailwind CSS config file: ${configPath}`)
+
+ postcss = __non_webpack_require__(postcssPath)
+ postcssSelectorParser = __non_webpack_require__(postcssSelectorParserPath)
+ console.log(`Loaded postcss v${postcssVersion}: ${postcssDir}`)
+
+ tailwindcss = __non_webpack_require__(tailwindcssPath)
+ console.log(`Loaded tailwindcss v${tailwindcssVersion}: ${tailwindDir}`)
try {
resolveConfigFn = __non_webpack_require__(resolveFrom(tailwindDir, './resolveConfig.js'))
|