-
Notifications
You must be signed in to change notification settings - Fork 164
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
refactor!: update api.context, remove entry
, targets
properties
#2680
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
entry
, targets
properties
I cannot find Seems like it has been changed to But the So, how could I migrate the following code: api.onDevCompileDone(async ({ isFirstCompile, stats }) => {
const entries = Object.keys(api.context.entry)
}) |
Yeah we have changed the design and no longer provides "api.context.environments". The onDevCompileDone callback should have a environements param, @9aoy do we missing it |
@colinaaa The environment api is not fully complete yet (also doc and features). And it seems that the
|
Summary
Remove
api.context.entry
andapi.context.targets
, useapi.environment
instead.The
distPath
andtsconfigPath
may be different in different environments. Rsbuild will try to get the parent distPath of environments ascontext.distPath
, it is recommended to useapi.environment[name]
instead ofapi.context
.Related Links
#2620
Checklist