Skip to content

fix: compare css contents correctly before writing file#250

Merged
Brentlok merged 1 commit into
uni-stack:mainfrom
a16n-dev:fix/css-contents-comparison
Dec 23, 2025
Merged

fix: compare css contents correctly before writing file#250
Brentlok merged 1 commit into
uni-stack:mainfrom
a16n-dev:fix/css-contents-comparison

Conversation

@a16n-dev

Copy link
Copy Markdown
Contributor

I noticed the buildCSS function seems to be doing an incorrect comparison:

// This is a file path
const cssFile = path.join(dirname, '../../uniwind.css')

// This is file contents
const oldCSSFile = fs.existsSync(cssFile)
  ? fs.readFileSync(cssFile, 'utf-8')
  : ''

// These will never be equal
if (oldCSSFile === cssFile) {
  return
}

@Brentlok Brentlok left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice catch 👌

@Brentlok Brentlok merged commit a8684ed into uni-stack:main Dec 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants