Skip to content
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(plugin-less): lessLoaderOptions.lessOptions.plugins has lose it's prototype. #3815

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Sang-Sang33
Copy link

Summary

fix the deepmerge to judge whether is an plain object.

Related Links

#3810

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@CLAassistant
Copy link

CLAassistant commented Oct 24, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

netlify bot commented Oct 24, 2024

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit cfedf4f
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/671a321d83ad860008e8ddb3
😎 Deploy Preview https://deploy-preview-3815--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 83 (🟢 up 9 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -75,7 +75,11 @@ const getLessLoaderOptions = (
): LessLoaderOptions => {
const getLessOptions = () => {
if (defaults.lessOptions && userOptions.lessOptions) {
return deepmerge(defaults.lessOptions, userOptions.lessOptions);
return deepmerge(defaults.lessOptions, userOptions.lessOptions, {
isMergeableObject: (obj) =>
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the internal isPlainObject helper here?

The same as

isMergeableObject: isPlainObject,

Copy link
Author

Choose a reason for hiding this comment

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

yeah, of course.

@Sang-Sang33 Sang-Sang33 force-pushed the fix-plugin-less-plugins branch 2 times, most recently from cac000a to 6c5b370 Compare October 24, 2024 11:16
@Sang-Sang33 Sang-Sang33 changed the title fix: lessLoaderOptions.lessOptions.plugins has lose it's prototype. fix(plugin-less): lessLoaderOptions.lessOptions.plugins has lose it's prototype. Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants