You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(this is some necessary evil because knip is loading the eslint config file from a different cwd)
Can I do something similar in v2, or maybe there's an alternative/better way to go about this?
Currently playing a bit with v2 and 2.0.0-beta.3 TS doesn't allow importing transform and neither does Node.js:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/babel.cjs' is not defined by "exports" in [..]/node_modules/jiti/package.json imported from [..]/knip/dist/util/require.js
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
Thanks for kind words. It is a tricky situation honestly. I also used jiti in places like unbuild/untyed as custom loader with custom transform and i know there are other libs that hook into jiti to add their transformer replacing babel.
But this also pushed back jiti from natively supporting more features and also when using jiti in envs like bun (and in the future vitest, web, deno) we want to bypass jiti as the core functionality (TS support) is natively available in those platforms.
Thanks for sharing usecase. I think if jiti exposes an agnostic transform hook it would fix your issue? (also have you tried using alias option to patch that specific package?)
Describe the feature
Perhaps this should be a discussion, but that led me to a more generic forum. Feel free to close or move it.
Great work on v2, glad this seems to be progressing wonderfully!
Using jiti v1, Knip can do this:
The goal is to use a custom transform and remove a specific line from the imported file:
https://github.com/webpro-nl/knip/blob/main/packages/knip/src/util/require.ts#L55-L65
(this is some necessary evil because knip is loading the eslint config file from a different cwd)
Can I do something similar in v2, or maybe there's an alternative/better way to go about this?
Currently playing a bit with v2 and
2.0.0-beta.3
TS doesn't allow importingtransform
and neither does Node.js:Additional information
The text was updated successfully, but these errors were encountered: