fix(core): failed to register environment plugin#4437
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| @@ -0,0 +1,2 @@ | |||
| .title-class | |||
| font-size: 14px; | |||
There was a problem hiding this comment.
Small nitpick, in Stylus no need for : between property name and value
font-size 14px;
There was a problem hiding this comment.
Nice catch, do you want to submit a PR to polish our stylus code?
There was a problem hiding this comment.
Not critical, we developers are very busy :) Next time ...
There was a problem hiding this comment.
Haha, never mind, I can do it with cursor
| import './a.styl'; | ||
| import style from './b.module.styl'; | ||
|
|
||
| console.log(style); |
There was a problem hiding this comment.
It is a good idea to console print during E2E tests?
There was a problem hiding this comment.
To prevent the bundler from removing unused `style' object.
This is client code, so the console.log won't affect the E2E logs.
There was a problem hiding this comment.
Ah, that's the most important change. Curious why this has been left out before?
There was a problem hiding this comment.
I missed this place, my bad.
| return; | ||
| } | ||
|
|
||
| // The current environment is not specified, skip it |
There was a problem hiding this comment.
Grammar, add "If" the current environment is not specified ...

Summary
Fix failed to register environment plugin.
Since #4283,
rsbuildOptions.environmentwill be empty array by default, and we should usecontext.specifiedEnvironmentsto filter environments.Related Links
#4435
Checklist