diff --git a/CHANGELOG.md b/CHANGELOG.md index 62e9d5265a09..0a00a241213c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Sort class lists deterministically for Prettier plugin ([#10672](https://github.com/tailwindlabs/tailwindcss/pull/10672)) - Ensure CLI builds have a non-zero exit code on failure ([#10703](https://github.com/tailwindlabs/tailwindcss/pull/10703)) - Ensure module dependencies for value `null`, is an empty `Set` ([#10877](https://github.com/tailwindlabs/tailwindcss/pull/10877)) +- Fix format assumption when resolving module dependencies ([#10878](https://github.com/tailwindlabs/tailwindcss/pull/10878)) ### Changed diff --git a/src/lib/getModuleDependencies.js b/src/lib/getModuleDependencies.js index bd27022f29c7..e6a38a89d21f 100644 --- a/src/lib/getModuleDependencies.js +++ b/src/lib/getModuleDependencies.js @@ -62,7 +62,7 @@ function* _getModuleDependencies(filename, base, seen, ext = path.extname(filena 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