Fix format assumption when resolving module dependencies

https://github.com/tailwindlabs/tailwindcss/pull/10878
master
Brad Cornes 2023-03-27 18:49:25 +01:00
parent ae18cb2449
commit 7978a2eb28
1 changed files with 1 additions and 1 deletions

View File

@ -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