Skip to content

Commit 87c2263

Browse files
authored
fix: resolve external css imports (#218)
1 parent 0682fc7 commit 87c2263

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

packages/uniwind/src/css/themes.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { compile } from '@tailwindcss/node'
22
import fs from 'fs'
33
import { transform } from 'lightningcss'
44
import path from 'path'
5-
import { name } from '../../package.json'
65
import { Logger } from '../metro/logger'
76

87
const readFileSafe = (filePath: string) => {
@@ -15,8 +14,6 @@ const readFileSafe = (filePath: string) => {
1514

1615
const isExcludedDependency = (url: string) =>
1716
[
18-
url === 'tailwindcss',
19-
url === name,
2017
url.includes('node_modules/tailwindcss'),
2118
url.includes('node_modules/@tailwindcss'),
2219
url.includes('node_modules/uniwind'),
@@ -80,7 +77,7 @@ export const generateCSSForThemes = async (themes: Array<string>, input: string)
8077
.map(dependency => `@import "${dependency.url}";`).join('\n')
8178

8279
await compile(importsCSS, {
83-
base: path.dirname(cssPath),
80+
base: path.resolve(path.dirname(cssPath)),
8481
onDependency: dependency => {
8582
if (isExcludedDependency(dependency)) {
8683
return

0 commit comments

Comments
 (0)