feat: add styles.entries config for injecting global stylesheets#929
Merged
feat: add styles.entries config for injecting global stylesheets#929
styles.entries config for injecting global stylesheets#929Conversation
Member
Author
Member
|
Hm OK - I think it's alright, some feedback:
Of course I'm OK merging as is because I think getting the feature in is pretty important but just wanted to point these 2 things out |
Member
Author
|
i think codex chose "entries" because it's consistent with vite naming, the only other thing i could think of is "entrypoints". "include" could work but it's a little more ambiguous for its purpose (e.g. someone may think to use "include" as a way of saying "these are all the css files that should be available in the site"). out of scope for limiting per route, we should continue to use |
Member
|
lgtm |
styles.entries config and inject configured stylesheet links during renderstyles.entries config for injecting global stylesheets
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.
Motivation
<link rel="stylesheet">tags on every rendered page.basepath.Description
stylessection toRootUserConfigwithentries?: string[]and documentation on normalization and de-duplication.Rendererto merge configured stylesheet entries into thecssDepsset before collecting auto-collected CSS, so manual entries appear first and duplicates are de-duped.getConfiguredStyleEntries()to normalize configured entries againstrootConfig.baseand introducednormalizeStyleEntry(entry, basePath)to produce URL-safe paths.styleTags.Testing
Codex Task