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

Fix require load of CJS config from ESM module #6458

Merged
merged 6 commits into from
Nov 2, 2024
Merged

Conversation

sneridagh
Copy link
Member

@sneridagh sneridagh commented Nov 2, 2024

Long story short: vitest globals tricked me :( and tests passed because in there, require is always around. When I tried in real life, it failed :(

Also in the vite-plugin, vite forces you to have the loader inside the scope of the node_modules (I guess that's a pnpm thing).

We must have apps folder with all the possible combinations (ESM/non-ESM). Volto tests themselves make Volto side safe (non-ESM, loading ESM).

@sneridagh sneridagh requested a review from pnicolli November 2, 2024 09:22
Copy link

netlify bot commented Nov 2, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 04ec216
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/67263e32a5a1a700080eab88

@sneridagh sneridagh merged commit c9e6264 into main Nov 2, 2024
68 checks passed
@sneridagh sneridagh deleted the fixcjsesmloadregistry branch November 2, 2024 15:20
sneridagh added a commit that referenced this pull request Nov 3, 2024
* main:
  Fix require load of CJS config from ESM module (#6458)
  Fix redirects (#6457)
  Clean up add-on-registry.md docs (#6456)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant