tailwindcss/src/lib
ivan 066ccf8894
Improve the performance when checking broad glob patterns. (#14481)
In a large project, it's costly to repeatedly call the
function `micromatch.isMatch` that parses a glob pattern,
creates a regular expression, and tests the path name
against the regular expression. To optimize performance,
it's important to cache the parsing and creating process
before entering the loop.

For example, the content configuration in a project
looks like this
`['./pages/**/*.{ts,js}', './node_modules/pages/**/*.{ts,js}']`.
If the project has 10000 matched files and 10 glob patterns,
the function `micromatch.isMatch` will be called 100000 times.

---

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-09-23 10:52:05 +02:00
..
cacheInvalidation.js Invalidate context when main css changes (#7626) 2022-02-25 13:12:45 -05:00
collapseAdjacentRules.js Handle duplicate atrules without children (#8122) 2022-04-15 12:24:27 -04:00
collapseDuplicateDeclarations.js Improve collapsing of duplicate declarations (#6856) 2022-01-03 15:41:49 +01:00
content.js Improve the performance when checking broad glob patterns. (#14481) 2024-09-23 10:52:05 +02:00
defaultExtractor.js Fix class detection in Slim templates with attached attributes and IDs (#14019) 2024-07-18 11:21:20 -04:00
evaluateTailwindFunctions.js Fix parsing of theme() inside calc() when there are no spaces around operators (#11157) 2023-07-13 11:48:34 -04:00
expandApplyAtRules.js Only detect nesting when using @apply (#13325) 2024-03-23 19:10:51 -04:00
expandTailwindAtRules.js Insert @defaults at start of stylesheet (#14427) 2024-09-17 09:09:08 -04:00
findAtConfigPath.js Improve warning messages (#9608) 2022-10-19 18:35:42 +02:00
generateRules.js Ensure that arbitrary properties respect important configuration (#13353) 2024-03-26 11:42:41 +01:00
getModuleDependencies.js Fix format assumption when resolving module dependencies (#10878) 2023-03-27 19:41:20 +02:00
load-config.ts Add .mts and .cts config file detection (#13940) 2024-07-03 23:09:35 +02:00
normalizeTailwindDirectives.js Improve various warnings (#7118) 2022-01-19 15:09:13 -05:00
offsets.js Sort arbitrary properties alphabetically across multiple class lists (#12911) 2024-02-13 14:17:23 -05:00
partitionApplyAtRules.js Fix consecutive builds with at apply producing different CSS (#6999) 2022-01-10 12:36:14 -05:00
regex.js Rewrite default class extractor (#8204) 2022-05-04 16:08:25 -04:00
remap-bitfield.js Sort arbitrary variants deterministically regardless of content order (#10016) 2022-12-08 09:05:46 -05:00
resolveDefaultsAtRules.js Insert @defaults at start of stylesheet (#14427) 2024-09-17 09:09:08 -04:00
setupContextUtils.js Fix crash showing completions in Intellisense when using a custom separator (#13306) 2024-03-21 19:38:17 -04:00
setupTrackingContext.js Don’t error when a config file is missing 2023-07-13 11:50:43 -04:00
sharedState.js Cleanup oxide — Part #2 (#13312) 2024-03-22 17:12:14 +01:00
substituteScreenAtRules.js Add tuple syntax to guarantee screens order (#6104) 2021-11-16 18:01:06 +01:00