088c19f709
Since we have 2 server compilers (node and edge), the `serverActions` object will always get overridden by the second compilation during `next build`. Like the client reference manifest, we need to have 2 objects for each compiler and merge them when outputting the asset. Besides that, to avoid `export default` being tree-shaken as unused export, I changed the loader to use CJS `module.exports` instead. Can't easily figure out a proper way for now but we plan to create separate worker for the action endpoint and this will be gone then. Fixes NEXT-759, read NEXT-761 for the full future plan. ## Bug - [ ] 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) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) |
||
---|---|---|
.. | ||
header | ||
server | ||
layout.js |