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(core): failed to register environment plugin #4437

Merged
merged 2 commits into from
Jan 26, 2025
Merged

Conversation

chenjiahan
Copy link
Member

Summary

Fix failed to register environment plugin.

Since #4283, rsbuildOptions.environment will be empty array by default, and we should use context.specifiedEnvironments to filter environments.

Related Links

#4435

Checklist

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

Copy link

netlify bot commented Jan 26, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit e08a079
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/6795df7531fa58000800fdb5
😎 Deploy Preview https://deploy-preview-4437--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: 69 (🔴 down 4 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.

@chenjiahan
Copy link
Member Author

@binarykitchen cc

@chenjiahan chenjiahan merged commit 5a18094 into main Jan 26, 2025
9 of 10 checks passed
@chenjiahan chenjiahan deleted the env_plugin_0126 branch January 26, 2025 07:26
@@ -0,0 +1,2 @@
.title-class
font-size: 14px;

Choose a reason for hiding this comment

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

Small nitpick, in Stylus no need for : between property name and value

font-size 14px;

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch, do you want to submit a PR to polish our stylus code?

Choose a reason for hiding this comment

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

Not critical, we developers are very busy :) Next time ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Haha, never mind, I can do it with cursor

import './a.styl';
import style from './b.module.styl';

console.log(style);

Choose a reason for hiding this comment

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

It is a good idea to console print during E2E tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

To prevent the bundler from removing unused `style' object.

This is client code, so the console.log won't affect the E2E logs.

Choose a reason for hiding this comment

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

Ah, that's the most important change. Curious why this has been left out before?

Copy link
Member Author

Choose a reason for hiding this comment

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

I missed this place, my bad.

Choose a reason for hiding this comment

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

Appreciate your honesty 🙇

}

// The current environment is not specified, skip it

Choose a reason for hiding this comment

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

Grammar, add "If" the current environment is not specified ...

This was referenced Jan 26, 2025
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.

2 participants