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

feat: support tsconfig paths #74

Merged

Conversation

error-four-o-four
Copy link
Contributor

@error-four-o-four error-four-o-four commented Jul 18, 2024

This implements support for the tsconfig compiler options paths and baseUrl and solves #48

  • Some tests (esp. 'clean-dist' and 'src-dist') fail because of an 'EPERM' error but that's definitely on my side. I'm working on a windows machine with a restricted user account. Due to my pnpm installation fs-fixtures does not have all permissions.
  • All other tests pass.
  • pnpm run lint fails due to 'ERR_MODULE_NOT_FOUND'. 'Did you mean to import [email protected]/node_modules/eslint-plugin-no-use-extend-native/index.js?' Don't know exactly why yet. Could be lintroll or my setup.

Please bear with me because it's my first time working with pnpm and under the hood of rollup.

Cheers

@error-four-o-four error-four-o-four changed the title Feat support paths feat: support tsconfig paths Jul 18, 2024
expect(pkgrollProcess.exitCode).toBe(0);
expect(pkgrollProcess.stderr).toBe('');

/** @todo expect */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that the preceding expectations (no errors during pkgrollProcess) are sufficient. On the other hand I couldn't come up with a simple test due to the complexity of the fixtures. Maybe on could reduce the latter.

@privatenumber privatenumber linked an issue Jul 19, 2024 that may be closed by this pull request
2 tasks
@privatenumber
Copy link
Owner

I refactored the plugin a bit. createPathsMatcher from get-tsconfig handles baseUrl and such as well.

Thanks for the PR and the contribution! Great PR and looking forward to collaborating with you more :)

@privatenumber privatenumber merged commit 5f0df84 into privatenumber:master Jul 19, 2024
2 checks passed
@privatenumber
Copy link
Owner

🎉 This issue has been resolved in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

feat: tsconfig paths support
2 participants