Skip to content

Commit

Permalink
fix: build problem
Browse files Browse the repository at this point in the history
  • Loading branch information
enpitsuLin committed Aug 4, 2023
1 parent 9c09210 commit 2b4c827
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/userscript/src/utils/unocss.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import unocss from 'uno.css?inline'

export function attachUnocss(root: ShadowRoot) {
if (import.meta.env.DEV) {
root.appendChild(unocss as any)
if (import.meta.env.DEV) {
import('uno.css?raw').then(({ default: unocss }) => {
root.appendChild(unocss as any)
})
}
else {
import('uno.css?raw').then(({ default: css }) => {
Expand Down

0 comments on commit 2b4c827

Please sign in to comment.