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(pnp): esm - handle symlinked extensionless entrypoints #4289

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Mar 29, 2022

What's the problem this PR addresses?

The way the PnP ESM loader checks if a file is the entrypoint doesn't work with symlinks.

Fixes #3900
Closes #4282

How did you fix it?

Save the resolved entrypoint path and compare against that instead of process.argv[1]

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz changed the title fix(pnp): handle symlinked extensionless commonjs files as the entrypoint fix(pnp): esm - handle symlinked extensionless entrypoints Mar 29, 2022
@merceyz merceyz added the esm label Mar 29, 2022
@merceyz merceyz force-pushed the merceyz/fix/pnp-cjs-symlink-entrypoint branch from 7ca00ec to 53b354c Compare March 29, 2022 16:39
@merceyz merceyz force-pushed the merceyz/fix/pnp-cjs-symlink-entrypoint branch from 53b354c to 0764215 Compare March 29, 2022 16:48
@merceyz merceyz enabled auto-merge (squash) March 29, 2022 16:52
@merceyz merceyz merged commit b0511b9 into master Mar 29, 2022
@merceyz merceyz deleted the merceyz/fix/pnp-cjs-symlink-entrypoint branch March 29, 2022 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for ... tsc
2 participants