Erase dynamic ssr:false imports on server (#43974)
Fixes #43895 There's a `is_server_components` condition introduced in #42426 but it's always truthy so the `ssr:false` is not erased properly. Then in #42589 the flag is removed but also the optimization is removed as well. This PR reverts the unexpected change removed in #42589 to keep the removal for client dynamic imports on server side. Add tests to keep there's no trace ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
Showing
Please
register
or
sign in
to comment