-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support preserveSymlinks
from tsconfig.json
#69
Comments
Are there any side effects to enabling |
I did some more research and found more issues in several repositories on this apparently very complex topic. This PR is very helpful, in addition this very precise explanation of the problem and the solution:
Quote:
This would be a solution that unbuild has also implemented with this PR: Another thing we could try is following this PR (and also several rollup/esbuild related plugins): The solution here is linked in the source code: We could try here: pkgroll/src/utils/get-rollup-configs.ts Lines 188 to 189 in 46c3875
@privatenumber maybe we could create a small test which fails the current issue, in order to try if implementing the condition solves the problem. This sounds like a cleaner solution to me. If it is to complex we could just go with default value |
🎉 This issue has been resolved in version 2.4.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Problem
This issue is related to
rollup-plugin-dts
Swatinem/rollup-plugin-dts#143 which has not been solved.As described in the issue, the plugin is not able to resolve Vue3 types from PNPM symlinks (default configuration).
As commented Swatinem/rollup-plugin-dts#143 (comment), the issue has not been fixed/solved, because it can be overcome setting
preserveSymlinks: false
, you have 3 options.Workaround using
tsconfig.json
:Workaround using
rollup.config
plugins
:Another workaround is using
shamefully-hoist
in.npmrc
.Workarounds:
tsconfig.json
workaround does not work, becausepkgroll
does not care aboutpreserveSymlinks
.rollup.config
workaround can't be used, because you can't configure rollup plugins withpkgroll
..npmrc
workaround is really annoying because it actually disables all pnpm benefits.Build-Error:
Expected behavior
I expect
pkgroll
to pick-upcompilerOptions.preserveSymlinks
fromtsconfig.json
, to resolve the issue, but it doesn't.Possible solutions
For testing I edited
node_modules/pkgroll/dist/cli.js
line 37compilerOptions:{composite:!1,preserveSymlinks:!1}
. This solves the issue.pkgroll@2.1.1.patch
So a solution would be to check for and add
preserveSymlinks
here:https://github.com/privatenumber/pkgroll/blob/46c38750a44992f9977471819f4bfa0ef2039639/src/utils/get-rollup-configs.ts#L66C6-L66C21
Minimal reproduction URL
https://github.com/jrson83/pkgroll-issue
Version
v2.1.1
Node.js version
v21.7.2
Package manager
pnpm
Operating system
Linux
Bugs are expected to be fixed by those affected by it
Compensating engineering work financially will speed up resolution
The text was updated successfully, but these errors were encountered: