Closed yoyo837 closed 6 months ago
I use rollup and @rollup/plugin-typescript to compile ts and tsx codes containing annotations. I found the code that uses absolute paths to reference tslib from the outpu files. Can anyone tell me how to solve it? What did I miss?
rollup
@rollup/plugin-typescript
tsconfig.json:
tsconfig.json
{ "compilerOptions": { "baseUrl": "./", "rootDir": "./", "target": "esnext", "module": "esnext", "moduleResolution": "node", "strict": false, "jsx": "react", "jsxFactory": "QuarkElement.h", "jsxFragmentFactory": "QuarkElement.Fragment", "sourceMap": false, "declaration": false, "removeComments": true, "resolveJsonModule": true, "esModuleInterop": true, "skipLibCheck": true, "strictNullChecks": true, "experimentalDecorators": true, "lib": ["esnext", "dom"], "types": ["vite/client", "./index.d.ts"], }, "include": [ "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", ".eslintrc.cjs", ".prettierrc.cjs", ".stylelintrc.cjs", "postcss.config.cjs", "babel.config.cjs", "rollup.config.mjs", "vite.config.mts", "typesGenerat.mjs" ], "exclude": ["node_modules", "lib", "umd"] }
I don't think this has anything to do with tslib, but with your bundler. You should ask on the rollup or rollup-typescript trackers.
rollup-typescript
Thanks for your reply.
I use
rollup
and@rollup/plugin-typescript
to compile ts and tsx codes containing annotations. I found the code that uses absolute paths to reference tslib from the outpu files. Can anyone tell me how to solve it? What did I miss?tsconfig.json
: