Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/core/src/_resolvers/skiyee-ui.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { ComponentResolver } from '../types'
import { kebabCase } from '../utils'

export default function SkResolver(): ComponentResolver {
return {
type: 'component',
resolve: (name: string) => {
if (name.match(/^(?:Sk[A-Z]|sk-[a-z])/)) {
let kebabCaseName: string = kebabCase(name)

return {
name,
from: `@skiyee/uni-ui/components/${kebabCaseName}.vue`
}
Comment on lines +11 to +14
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

Consider style side-effects if the library expects per-component CSS.

If components ship styles separately, expose sideEffects to auto-import them (pattern depends on the lib).


🌐 Web query:

Check the skiyee/ui docs for per-component style import paths and whether styles are auto-included or require manual import.

💡 Result:

Short answer: The skiyee UI packages do not appear to auto-inject all component CSS by default — you must import styles yourself (either a global CSS entry or use a helper/resolver). The project has packages for styling and automation: @skiyee/ui-preset (UnoCSS preset) and an @skiyee/ui-resolver (component auto-import resolver) which indicate on-demand/automatic wiring is available via those tools, but core docs/npm README show manual import of the library CSS (e.g. import the package CSS from dist or include a global stylesheet). [1][2][3]

References

  • ski-ui / ski (README showing explicit global CSS import instructions). [1]
  • npm listing for ski-ui (same global-style import examples). [2]
  • @skiyee/ui-resolver and @skiyee/ui-preset package pages (resolver/preset to enable auto-import / UnoCSS-driven styling). [3][4]

Expose per-component CSS via sideEffects in the skiyee resolver.
skiyee UI doesn't auto-inject component CSS; update packages/core/src/_resolvers/skiyee-ui.ts (the resolver return) to include a sideEffects entry that imports the library's per-component style path (or ensure the global/dist stylesheet is imported via the preset/resolver).

🤖 Prompt for AI Agents
In packages/core/src/_resolvers/skiyee-ui.ts around lines 11 to 14, the resolver
return only exposes name and from and does not mark per-component CSS as side
effects; update the returned object to include a sideEffects entry that imports
the component's stylesheet (for example add sideEffects:
[`@skiyee/uni-ui/components/${kebabCaseName}.css`] or the correct library
per-component style path), or alternatively ensure the resolver/preset imports
the library global/dist stylesheet; make the sideEffects value an array so
bundlers include the CSS when the component is used.

}
},
}
}