fix(styles): stop scanning every component for utility sources
Component discovery is not utility-source discovery: scanning all built-in and plugin component directories made Tailwind/Iconify generate rules for components the app never renders. Packages that need scanning opt in through styles.source. Pre-existing working-tree change, committed as-is rather than authored here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -440,10 +440,9 @@ export async function startServer(opts: ServeOptions): Promise<RunningServer> {
|
||||
config: opts.stylesConfig,
|
||||
appRoot,
|
||||
publicDir: join(appRoot, "public"),
|
||||
sources: [
|
||||
...componentDirs,
|
||||
...pluginContributions.styles.flatMap((style) => (style.source ? [style.source] : [])),
|
||||
],
|
||||
// Component discovery is separate from utility-source discovery.
|
||||
// Packages that need Tailwind scanning opt in via styles.source.
|
||||
sources: pluginContributions.styles.flatMap((style) => (style.source ? [style.source] : [])),
|
||||
entries: pluginContributions.styles.flatMap((style) => (style.entry ? [style.entry] : [])),
|
||||
},
|
||||
theme,
|
||||
|
||||
Reference in New Issue
Block a user