-
Notifications
You must be signed in to change notification settings - Fork 72
rpt2 does not resolve pnpm symlinked dependencies #234
Copy link
Copy link
Closed
Labels
kind: bugSomething isn't working properlySomething isn't working properlytopic: TS Compiler API DocsRelated to the severely lacking TS Compiler API DocsRelated to the severely lacking TS Compiler API Docstopic: monorepo / symlinksRelated to monorepos and/or symlinks (Lerna, Yarn, PNPM, Rush, etc)Related to monorepos and/or symlinks (Lerna, Yarn, PNPM, Rush, etc)
Metadata
Metadata
Assignees
Labels
kind: bugSomething isn't working properlySomething isn't working properlytopic: TS Compiler API DocsRelated to the severely lacking TS Compiler API DocsRelated to the severely lacking TS Compiler API Docstopic: monorepo / symlinksRelated to monorepos and/or symlinks (Lerna, Yarn, PNPM, Rush, etc)Related to monorepos and/or symlinks (Lerna, Yarn, PNPM, Rush, etc)
What happens and why it is wrong
When trying to build a project installed with
pnpm,rpt2fails to resolve the created symlinked dependencies innode_modules(non-flat).Setting
check: falseis (arguably) a workaround.Related issues: #188, #214
Reproduction
Repository: https://github.com/davelsan/rpt2-pnpm-symlinks
Config: https://github.com/davelsan/rpt2-pnpm-symlinks/blob/master/rollup.config.js
The provided repro is a minimal
vue3plugin that imports theAppinterface fromvueinindex.tsThis import causes the following error on build:
Setting the
checkoption tofalseinrollup.config.jseliminates the error.Versions
rollup.config.js
tsconfig.json
A snippet with the relevant module resolution options only.
{ "compilerOptions": { "target": "esnext", "module": "esnext", "moduleResolution": "node", "allowSyntheticDefaultImports": true, "esModuleInterop": true, } }package.json
A snippet with the relevant dependencies only.
{ "peerDependencies": { "vue": "^3.0.7" }, "devDependencies": { "rollup": "^2.41.5", "rollup-plugin-typescript2": "^0.30.0", "typescript": "^4.2.3", "vue": "^3.0.7" } }