From 7978a2eb28e0c96dc3829697706b4c8df1aefea2 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Mon, 27 Mar 2023 18:49:25 +0100 Subject: [PATCH] Fix format assumption when resolving module dependencies https://github.com/tailwindlabs/tailwindcss/pull/10878 --- .../src/util/getModuleDependencies.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts b/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts index 0908043..103a993 100644 --- a/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts +++ b/packages/tailwindcss-language-server/src/util/getModuleDependencies.ts @@ -69,7 +69,7 @@ function* _getModuleDependencies( for (let match of [ ...contents.matchAll(/import[\s\S]*?['"](.{3,}?)['"]/gi), ...contents.matchAll(/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi), - ...contents.matchAll(/require\(['"`](.{3,})['"`]\)/gi), + ...contents.matchAll(/require\(['"`](.+)['"`]\)/gi), ]) { // Bail out if it's not a relative file if (!match[1].startsWith('.')) continue