Skip to content

[WIP] Update template to use Lightning CSS instead of PostCSS#18

Merged
nichoth merged 2 commits intomainfrom
copilot/update-template-lightning-css
Jan 23, 2026
Merged

[WIP] Update template to use Lightning CSS instead of PostCSS#18
nichoth merged 2 commits intomainfrom
copilot/update-template-lightning-css

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Migration from PostCSS to Lightning CSS

Changes Completed:

  • Update package.json to remove postcss-nesting dependency
  • Update package.json to add lightningcss dependency (^1.28.3)
  • Update vite.config.js to remove postcssNesting import
  • Update vite.config.js to replace css.postcss configuration with Lightning CSS
  • Update vite.config.js to add css.transformer: 'lightningcss'
  • Update vite.config.js to add css.lightningcss.drafts.nesting: true
  • Update vite.config.js to add build.cssMinify: 'lightningcss'
  • Test the build process to ensure everything works correctly
  • Run code review - no issues found
  • Run security scan - no vulnerabilities found

Summary:

All changes have been successfully implemented and validated. Lightning CSS is now configured to handle CSS processing with nesting support and minification.

Original prompt

Objective

Update the template to use Lightning CSS instead of PostCSS for CSS processing.

Changes Required

1. Update package.json

  • Remove the postcss-nesting dependency
  • Add lightningcss dependency (version ^1.28.3)

2. Update vite.config.js

  • Remove the postcssNesting import statement
  • Replace the css.postcss configuration with Lightning CSS configuration
  • Add css.transformer: 'lightningcss'
  • Add css.lightningcss.drafts.nesting: true to enable CSS nesting support
  • Add build.cssMinify: 'lightningcss' to use Lightning CSS for minification during builds

Benefits

  • Lightning CSS is significantly faster than PostCSS
  • Provides built-in support for CSS nesting and other modern CSS features
  • Maintains the same CSS nesting functionality previously provided by postcss-nesting

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: nichoth <5776508+nichoth@users.noreply.github.com>
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedlightningcss@​1.31.1991001009170

View full report

@nichoth nichoth marked this pull request as ready for review January 23, 2026 21:38
@nichoth nichoth merged commit a4e9628 into main Jan 23, 2026
2 of 3 checks passed
@nichoth nichoth deleted the copilot/update-template-lightning-css branch January 23, 2026 21:38
Copilot AI requested a review from nichoth January 23, 2026 21:38
Copilot stopped work on behalf of nichoth due to an error January 23, 2026 21:38
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