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

Remove edge shared deps #41413

Merged
merged 3 commits into from Oct 14, 2022
Merged

Remove edge shared deps #41413

merged 3 commits into from Oct 14, 2022

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Oct 14, 2022

Since we have already bundled dependencies for server layer, so the shared deps chunk group is not needed anymore.
Also changing to esm assets import with next internals for edge function and middleware build.

The changes are originally from #41337, try to land them separately.

x-ref: a50d7f8

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team type: next labels Oct 14, 2022
@ijjk
Copy link
Member

ijjk commented Oct 14, 2022

Failing test suites

Commit: ee50c00

pnpm testheadless test/e2e/switchable-runtime/index.test.ts

  • Switchable runtime > Switchable runtime (prod) > should build /api/hello and /api/edge as an api route with edge runtime
Expand output

● Switchable runtime › Switchable runtime (prod) › should build /api/hello and /api/edge as an api route with edge runtime

expect(received).toMatchObject(expected)

- Expected  - 0
+ Received  + 2

@@ -2,10 +2,11 @@
    "functions": Object {
      "/api/edge": Object {
        "env": Array [],
        "files": Array [
          "server/edge-runtime-webpack.js",
+         "server/edge-chunks/149.js",
          "server/pages/api/edge.js",
        ],
        "matchers": Array [
          Object {
            "regexp": "^/api/edge$",
@@ -17,10 +18,11 @@
      },
      "/api/hello": Object {
        "env": Array [],
        "files": Array [
          "server/edge-runtime-webpack.js",
+         "server/edge-chunks/149.js",
          "server/pages/api/hello.js",
        ],
        "matchers": Array [
          Object {
            "regexp": "^/api/hello$",

  586 |             join(context.appDir, '.next/server/middleware-manifest.json')
  587 |           )
> 588 |           expect(manifest).toMatchObject({
      |                            ^
  589 |             functions: {
  590 |               '/api/hello': {
  591 |                 env: [],

  at Object.<anonymous> (e2e/switchable-runtime/index.test.ts:588:28)

Read more about building and testing Next.js in contributing.md.

@huozhi huozhi marked this pull request as ready for review October 14, 2022 10:15
shuding
shuding previously approved these changes Oct 14, 2022
@huozhi huozhi merged commit 7297942 into vercel:canary Oct 14, 2022
@huozhi huozhi deleted the remove-edge-shared-deps branch October 14, 2022 13:09
Kikobeats pushed a commit to Kikobeats/next.js that referenced this pull request Oct 24, 2022
Since we have already bundled dependencies for server layer, so the
shared deps chunk group is not needed anymore.
Also changing to esm assets import with next internals for edge function
and middleware build.

The changes are originally from vercel#41337, try to land them separately.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants