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

WIP: Add entry points compatible with Next.js App Router #559

Closed
wants to merge 6 commits into from

Conversation

JohnAlbin
Copy link
Collaborator

This pull request is for: (mark with an "x")

  • examples/*
  • modules/next
  • packages/next-drupal
  • starters/basic-starter
  • starters/graphql-starter
  • Other

GitHub Issue: #442

Describe your changes

Adds six new entry points so that developers can be more selective of which parts of the code base they import into their Server Components.

@vercel
Copy link

vercel bot commented Oct 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-drupal ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2023 0:13am

@JohnAlbin
Copy link
Collaborator Author

The microbundle build is failing in the CI with:

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

The build is about 5.5x slower in the CI than my local laptop. Which means the failing build would take about 2.4 minutes to complete if it wasn't running out of memory. :-p Previous builds took 21 seconds in the CI.

@github-actions
Copy link

🎉 Experimental release published 📦️ on npm!

pnpm add next-drupal@0.0.0-pr.559.0c3c8cef
yarn add next-drupal@0.0.0-pr.559.0c3c8cef
npm i next-drupal@0.0.0-pr.559.0c3c8cef

@pookmish
Copy link

I'm getting an error when using the new experimental release:

⨯ node_modules/next-drupal/dist/index.modern.js (1063:22) @ eval
 ⨯ TypeError: jsona__WEBPACK_IMPORTED_MODULE_0__ is not a constructor
    at eval (webpack-internal:///(rsc)/./node_modules/next-drupal/dist/index.modern.js:1063:23)

I encountered this when using any functions, for example getMenu. I've double checked and jsona is installed.

@amarincolas
Copy link

I'm getting an error when using the new experimental release:

⨯ node_modules/next-drupal/dist/index.modern.js (1063:22) @ eval
 ⨯ TypeError: jsona__WEBPACK_IMPORTED_MODULE_0__ is not a constructor
    at eval (webpack-internal:///(rsc)/./node_modules/next-drupal/dist/index.modern.js:1063:23)

I encountered this when using any functions, for example getMenu. I've double checked and jsona is installed.

Same here

@JohnAlbin
Copy link
Collaborator Author

Thanks for testing this PR release out. It was supposed to be a drop-in replacement for 1.6.0, but it's not working correctly. This is why we test! :D

I'm not able to reproduce the jsona-related error. Instead I get a different error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'node_modules/next/router'
 imported from node_modules/next-drupal/dist/index.modern.js

I know what is causing this error, so I'll fix that. I'm opening up a new PR with a different approach.

@JohnAlbin JohnAlbin closed this Nov 15, 2023
@JohnAlbin JohnAlbin deleted the 442-new-entry-points branch November 15, 2023 08:00
@JohnAlbin
Copy link
Collaborator Author

BTW, with the new PR release, I am getting a TypeError: Jsona is not a constructor error now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants