Skip to content

fix: meriyah export map Nitro/Rollup issue#100

Open
timfish wants to merge 1 commit into
mainfrom
fix/meriyah-exports
Open

fix: meriyah export map Nitro/Rollup issue#100
timfish wants to merge 1 commit into
mainfrom
fix/meriyah-exports

Conversation

@timfish

@timfish timfish commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

meriyah changed its export map for 6.1.0 and removed the import condition:

version exports
5.0.0 {"import": "./dist/meriyah.esm.mjs", "require": "./dist/meriyah.cjs", ...}
6.0.0 {"import": "./dist/meriyah.min.mjs", "require": "./dist/meriyah.cjs", ...}
6.1.0+ {"module-sync": "./dist/meriyah.mjs", "require": "./dist/meriyah.cjs", "default": "./dist/meriyah.mjs"} — no plain "import" key

This causes issues with Nitro and/or the Rollup CommonJs plugin which fails to resolve the required files. The module then can't be found at runtime.

I opened a PR to add this back in meriyah:

However, they are a major ahead of us. Even if this gets merged we can't use it without dropping Node v18 support. @nodejs/orchestrion-js-maintainers does anyone else still need to support Node v18?

I also opened an issue for Nitro:

This PR downgrades to a meriyah version which doesn't cause the issue. Hopefully we can revert this at some point or upgrade to v7?

@AbhiPrasad

Copy link
Copy Markdown
Member

I would be fine with dropping Node 18, but it did only EOL last year so the extended compat window is nice.

@timfish timfish changed the title fix: meriyah export map Rollup issue fix: meriyah export map Nitro/Rollup issue Jul 22, 2026

@jsumners-nr jsumners-nr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping v18 is fine by me.

Comment thread package.json
"astring": "^1.9.0",
"esquery": "^1.7.0",
"meriyah": "^6.1.4",
"meriyah": "^6.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this will solve the described issue. I would expect 6.0.0 or >=6.0.0 <6.1.0.

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.

3 participants