fix: meriyah export map Nitro/Rollup issue - #100
Conversation
|
I would be fine with dropping Node 18, but it did only EOL last year so the extended compat window is nice. |
meriyah export map Rollup issuemeriyah export map Nitro/Rollup issue
jsumners-nr
left a comment
There was a problem hiding this comment.
Dropping v18 is fine by me.
| "astring": "^1.9.0", | ||
| "esquery": "^1.7.0", | ||
| "meriyah": "^6.1.4", | ||
| "meriyah": "^6.0.0", |
There was a problem hiding this comment.
I don't understand how this will solve the described issue. I would expect 6.0.0 or >=6.0.0 <6.1.0.
There was a problem hiding this comment.
Ah good catch, this should be ~6.0.0!
@timfish We do as it is still supported until next year 😅 Maybe it could accept a custom parser and we could pass our own Meriyah? |
|
I wonder why Meriyah dropped support to begin with though, for something as simple as a parser it shouldn't be hard to support older versions of Node 🤔 |
Exactly!
That's perfectly fine, I just wanted to double check if there was an easy fix. For now we just bundle the dependencies for our CJS output and everything becomes simple |
meriyahchanged its export map for 6.1.0 and removed theimportcondition: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:
importremoved from export map meriyah/meriyah#585However, 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:
importcondition nitrojs/nitro#4456This PR downgrades to a
meriyahversion which doesn't cause the issue. Hopefully we can revert this at some point or upgrade to v7?