-
-
Notifications
You must be signed in to change notification settings - Fork 103
Default to modern Sass API for sass-loader #879
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
base: main
Are you sure you want to change the base?
Conversation
The legacy API is deprecated. Using api: 'modern' improves compatibility with plugins like sass-resources-loader that require the modern API. Fixes #877 Co-Authored-By: Claude Opus 4.5 <[email protected]>
WalkthroughThis PR defaults sass-loader to the modern Sass API by setting Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile OverviewGreptile SummaryThis PR defaults sass-loader to use the modern Sass API instead of the deprecated legacy API, improving compatibility with sass plugins like sass-resources-loader. Key changes:
Note: This PR is missing a CHANGELOG entry. Per project guidelines in Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User as Developer
participant Webpack as Webpack/Rspack
participant SassRule as sass.ts
participant SassLoader as sass-loader
participant SassCompiler as Sass Compiler
User->>Webpack: Build process initiated
Webpack->>SassRule: Request Sass rule configuration
SassRule->>SassRule: Check sass-loader version
alt sass-loader v16 or later
SassRule->>SassRule: Use loadPaths option key
else sass-loader v15 or earlier
SassRule->>SassRule: Use includePaths option key
end
SassRule->>SassLoader: Configure with modern API enabled
Note over SassLoader: Modern Sass API provides<br/>better plugin compatibility
SassLoader->>SassCompiler: Compile Sass files using modern API
SassCompiler-->>SassLoader: Compiled CSS
SassLoader-->>Webpack: Processed CSS output
Webpack-->>User: Built assets with compiled styles
|
Documents the breaking change with migration instructions for users who need to revert to the legacy API. Co-Authored-By: Claude Opus 4.5 <[email protected]>
PR Review: Default to Modern Sass API✅ Overall AssessmentThis is a well-implemented PR that makes a sensible default change. The code quality is excellent and follows project conventions. Code Quality & Best PracticesStrengths:
Minor Observations:
Test CoverageStrengths:
Potential Consideration:
Potential IssuesNone identified. The change is:
Performance Considerations✅ Positive Impact:
Security Concerns✅ None identified.
Documentation & ChangelogStrengths:
Formatting: Rspack Compatibility✅ Verified: This change works with both webpack and rspack since:
Recommendations
SummaryThis is a high-quality PR that:
Recommendation: Approve and merge (pending CI checks passing). Great work @justin808! 🎉 |
Summary
api: 'modern'instead of the deprecated legacy APIFixes #877
Test plan
api: 'modern'is set🤖 Generated with Claude Code
Summary by CodeRabbit
Breaking Changes
Fixed
Documentation