Repository navigation
fix(build): resolve extensionless CSS imports and directory indexes - #173
Open
cixiangtao wants to merge 1 commit into
Open
cixiangtao wants to merge 1 commit into
cixiangtao wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cn buildrejects relative CSS imports that Tailwind resolves successfully:Tailwind compiles
rounded-card, butcn build --css app.css --fulltries to read the literalthemepath and throwsENOENT. Importing a directory containingindex.cssthrowsEISDIR. An unexported package directory such astheme-kit/tokensis silently skipped, leaving its custom theme classes unmerged.Resolve filesystem imports in order: exact file,
.css, thenindex/index.css. Preserve trailing slashes so an explicit directory import cannot select a sibling.cssfile. The resolved stylesheet remains incssFilesfor watching, and missing relative imports retain their diagnostic.Nine regression cases cover sibling and parent imports, directory indexes, trailing slashes, file/index precedence, explicit filenames, and an unexported package subdirectory. They check both dependency tracking and generated tables:
cn("rounded-card rounded-lg")returns"rounded-lg". A patch changeset is included.Validation:
cn@0.5.2and@tailwindcss/node@4.3.5. Tailwind generates both utilities in all nine fixtures; the patched builder resolves the same theme in every case.vp checkandvp run typecheckpass.FUZZ_ITERS=300000 vp run testpasses all suites, including 56,353 correctness cases and 300,000 fuzz cases.vp run sizepasses: default entry remains 26,631 bytes minified / 11,021 bytes gzip, below the 11,100-byte budget.