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.
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() { | |||
There was a problem hiding this comment.
The filename contains a typo: 'lightiningcss-loader.ts' should be 'lightningcss-loader.ts' (missing 'n' in 'lightning').
| import { parseDeclaration, round } from "./declarations"; | ||
| import { inlineVariables } from "./inline-variables"; | ||
| import { extractKeyFrames } from "./keyframes"; | ||
| import { lightningcssLoader } from "./lightiningcss-loader"; |
There was a problem hiding this comment.
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.