Skip to content

v4: Support loading bundled versions of some first-party plugins #1240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 27, 2025

Conversation

thecrypticace
Copy link
Contributor

see #1224 (comment)

This adds support for loading these three plugins in v4 only when using @plugin if we can't find them:

  • @tailwindcss/typography
  • @tailwindcss/forms
  • @tailwindcss/aspect-ratio

This coincides with behavior of the Standalone CLI where these are bundled instead of available as an NPM package.

I've additionally logs when trying to import one of these plugins inside a JS file. This does not work right now and may take some effort to support because it will at least require the use of Node's experimental loader's API and potentially additional work as well.

@thecrypticace thecrypticace changed the title v4: Support loading bundled versions of some for first-party plugins v4: Support loading bundled versions of some first-party plugins Feb 27, 2025
// If the request was to load a first-party plugin and we can't resolve it
// locally, then fall back to the built-in plugins that we know about.
if (resourceType === 'plugin' && id in plugins) {
console.log('Loading bundled plugin for: ', id)
Copy link
Member

Choose a reason for hiding this comment

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

Did you keep these logs on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. We send these to the "Tailwind CSS IntelliSense" output panel in VSCode. It's useful for triaging issues.

@thecrypticace thecrypticace merged commit c8efeca into main Feb 27, 2025
@thecrypticace thecrypticace deleted the feat/builtin-plugin-loading branch February 27, 2025 16:44
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