-
Notifications
You must be signed in to change notification settings - Fork 19
fix: remove lightningcss as a peerDep. Use the version provided by expo #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove lightningcss as a peerDep. Use the version provided by expo #183
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the direct peer dependency on lightningcss and instead dynamically loads it from the @expo/metro-config package, falling back to direct resolution if needed. This change allows the project to use the version of lightningcss provided by Expo's configuration rather than requiring users to install it separately.
Key changes:
- Added a new
lightningcssLoaderutility to dynamically resolve and loadlightningcss - Updated the compiler to use the dynamically loaded version instead of direct imports
- Enhanced style rule mapping propagation throughout the compilation process
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/compiler/lightiningcss-loader.ts |
New loader utility that resolves lightningcss from @expo/metro-config or fallback |
src/compiler/compiler.ts |
Updated to use dynamic lightningcss loading and improved mapping propagation |
src/compiler/selector-builder.ts |
Enhanced root variable selector detection to handle nesting |
package.json |
Removed lightningcss as a peer dependency |
| Test files | Updated test expectations for new compilation behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -0,0 +1,40 @@ | |||
| export function lightningcssLoader() { | |||
Copilot
AI
Sep 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename contains a typo: 'lightiningcss-loader.ts' should be 'lightningcss-loader.ts' (missing 'n' in 'lightning').
src/compiler/compiler.ts
Outdated
| import { parseDeclaration, round } from "./declarations"; | ||
| import { inlineVariables } from "./inline-variables"; | ||
| import { extractKeyFrames } from "./keyframes"; | ||
| import { lightningcssLoader } from "./lightiningcss-loader"; |
Copilot
AI
Sep 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path contains a typo: './lightiningcss-loader' should be './lightningcss-loader' (missing 'n' in 'lightning').
| import { lightningcssLoader } from "./lightiningcss-loader"; | |
| import { lightningcssLoader } from "./lightningcss-loader"; |
7e956b3 to
8ff7f69
Compare
8ff7f69 to
c58ad12
Compare
Merge activity
|

No description provided.