Skip to content

Add support for new loadModule and loadStylesheet APIs from v4#317

Merged
thecrypticace merged 3 commits intomainfrom
feat/v4-load-stylesheet
Sep 24, 2024
Merged

Add support for new loadModule and loadStylesheet APIs from v4#317
thecrypticace merged 3 commits intomainfrom
feat/v4-load-stylesheet

Conversation

@thecrypticace
Copy link
Copy Markdown
Contributor

@thecrypticace thecrypticace commented Sep 20, 2024

Related to tailwindlabs/tailwindcss#14446

We'll be handling @import resolution in core with the appropriate hooks to ensure that all I/O is done outside of the core package. This PR preps for that.

@thecrypticace thecrypticace changed the title Add support for new loadModule and loadStylesheet APIs Add support for new loadModule and loadStylesheet APIs from v4 Sep 20, 2024
@thecrypticace thecrypticace force-pushed the feat/v4-load-stylesheet branch 3 times, most recently from 7fac133 to 6e741ac Compare September 23, 2024 17:43
@thecrypticace thecrypticace marked this pull request as ready for review September 23, 2024 18:20
Comment thread src/config.ts
Comment on lines +226 to +230
if (!supportsImports) {
let resolveImports = postcss([postcssImport()])
let result = await resolveImports.process(css, { from: entryPoint })
css = result.css
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that we can already shave off some work here too 💪

@thecrypticace thecrypticace merged commit cdb3b98 into main Sep 24, 2024
@thecrypticace thecrypticace deleted the feat/v4-load-stylesheet branch September 24, 2024 15:57
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
…ailwindlabs#317)

* Refactor

* Use `enhanced-resolve` to load files

* Add support for new loadModule and loadStylesheet APIs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants