-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix(dev): lazily generate CSS bundle #6535
Conversation
🦋 Changeset detectedLatest commit: 3a3da5a The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
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 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
In order to improve build performance of Remix projects that aren't using CSS bundling features, this PR modifies the compiler so that the CSS bundle build (which is a separate esbuild compilation) isn't started until an import of
@remix-run/css-bundle
is detected in the client and server builds.Since the
cssBundleHref
value is now entirely managed by an esbuild plugin, it's no longer part of the Remix manifest. This meant that thecss-bundle
package could be simplified. It no longer reads the manifest which means it doesn't depend on@remix-run/dev
anymore, and it doesn't need to have different logic for client and server, so it can now be expressed in a singleindex.ts
file.