feat(astro-purgecss): add includeDefaultContent option#1045
Conversation
🦋 Changeset detectedLatest commit: e09e4b0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
224821c to
b9971ab
Compare
|
hey @juanrgm thanks for creating this PR, I will take a look into this asap. |
commit: |
|
This looks like it would solve #1001 (although I haven't tried it out) since for that usecase you could set Perhaps missing here still is documentation on how to use |
|
I'm thinking of an API like this: export type PurgeCSSOptions = {
content?: Array<string | RawContent> | (() => Array<string | RawContent>);
};This would allow users to pass a function that returns custom paths. If a function is provided, it will take precedence and everything else will be ignored. |
|
That was my first option, but it's confusing. There are only four options.
The cleanest option is the number 2. |
|
|
For my usecase with a very large number of pages, an I like the The content Array or function would both provide additions to the default content (unless it was excluded using Another potential for the function option would be as a separate field in PurgeCSSOptions like this: The user could specify either, both or none of |
|
closed in-favor of #1288, thank you all for the valuable feedback 🙏 . this has been sitting stale for a long time it's good to have it resolved. |
Closes #1001