Skip to content

Conversation

nicknovitski
Copy link

This fixes #890, and my usage. I think every package using subpath imports in package.json instead paths rewriting in .swcrc will need to use conditions, and therefore will need this change to support switching to ESM.

The get-conditions package parses process.argv and process.env.NODE_OPTIONS, and also adds "node", and, if --no-addons hasn't been set, "node-options".

@CLAassistant
Copy link

CLAassistant commented Jun 16, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedget-conditions@​1.0.0571008076100

View full report

@nicknovitski
Copy link
Author

If it's preferable I can implement that logic instead of adding the dependency.

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

Successfully merging this pull request may close these issues.

[@swc-node/register] passing flag --condition (-C) to node with esm-register import has no effect
2 participants