{"id":21994,"library":"rollup-plugin-dts-path-alias","title":"rollup-plugin-dts-path-alias","description":"A Rollup plugin that resolves TypeScript path aliases and baseUrl in .d.ts files, converting them to relative paths. Current version 0.0.3 (2024), stable but early-stage. Designed for individual .ts file builds (not bundled .d.ts). Key differentiator: works with @rollup/plugin-typescript, not rollup-plugin-dts. Supports monorepos and auto-discovers tsconfig.json. Helps ensure type declaration portability across projects.","status":"active","version":"0.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/ronparkdev/rollup-plugin-dts-path-alias","tags":["javascript","typescript"],"install":[{"cmd":"npm install rollup-plugin-dts-path-alias","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-dts-path-alias","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-dts-path-alias","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; does not export a named export. Use default import. CommonJS require will fail.","wrong":"const dtsPathAlias = require('rollup-plugin-dts-path-alias')","symbol":"default","correct":"import dtsPathAlias from 'rollup-plugin-dts-path-alias'"},{"note":"The plugin is default-exported. Named import { dtsPathAlias } is incorrect.","wrong":"import { dtsPathAlias } from 'rollup-plugin-dts-path-alias'","symbol":"dtsPathAlias","correct":"import dtsPathAlias from 'rollup-plugin-dts-path-alias'"},{"note":"The plugin does not export a TypeScript type; use Rollup's Plugin type if needed.","wrong":null,"symbol":"dtsPathAlias (type)","correct":"import type { Plugin } from 'rollup';\nimport dtsPathAlias from 'rollup-plugin-dts-path-alias'"}],"quickstart":{"code":"import typescript from '@rollup/plugin-typescript';\nimport dtsPathAlias from 'rollup-plugin-dts-path-alias';\n\nexport default {\n  input: 'src/index.ts',\n  output: {\n    dir: 'dist',\n    format: 'es',\n  },\n  plugins: [\n    dtsPathAlias(),\n    typescript(),\n  ],\n};","lang":"typescript","description":"Typical Rollup config using @rollup/plugin-typescript and dtsPathAlias to compile TypeScript and resolve path aliases in .d.ts files."},"warnings":[{"fix":"Place dtsPathAlias() before typescript() in the plugins array.","message":"Plugins order matters: dtsPathAlias() must be placed before typescript() to apply transformations on emitted .d.ts files.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use @rollup/plugin-typescript for individual file builds.","message":"Does not work with rollup-plugin-dts (rollup-plugin-dts bundles .d.ts). Use with @rollup/plugin-typescript or similar.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"No action needed.","message":"No deprecated features in version 0.0.3.","severity":"deprecated","affected_versions":"0.0.3"}],"env_vars":null,"search_vec":"'0.0.3':27 '2024':28 'across':65 'alia':6 'alias':14 'auto':57 'auto-discov':56 'baseurl':16 'build':39 'bundl':41 'convert':20 'current':25 'd.ts':18,42 'declar':63 'design':34 'differenti':44 'discov':58 'dts':4,52 'earli':32 'early-stag':31 'ensur':61 'file':19,38 'help':60 'individu':36 'javascript':67 'key':43 'monorepo':54 'path':5,13,24 'plugin':3,9,51 'portabl':64 'project':66 'relat':23 'resolv':11 'rollup':2,8,50 'rollup-plugin-dt':49 'rollup-plugin-dts-path-alia':1 'rollup/plugin-typescript':47 'stabl':29 'stage':33 'support':53 'ts':37 'tsconfig.json':59 'type':62 'typescript':12,68 'version':26 'work':45","created_at":"2026-04-27T17:02:50.595588+00:00","updated_at":"2026-04-27T17:02:50.595588+00:00","problems":[{"fix":"npm install rollup-plugin-dts-path-alias --save-dev","cause":"Package not installed or import path incorrect.","error":"Error: Cannot find module 'rollup-plugin-dts-path-alias'"},{"fix":"import dtsPathAlias from 'rollup-plugin-dts-path-alias';","cause":"Named import used instead of default import.","error":"TypeError: dtsPathAlias is not a function"},{"fix":"Ensure tsconfig.json exists or provide cwd option.","cause":"tsconfig.json not found in cwd or parent directories.","error":"Error: Could not find tsconfig.json"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ronparkdev/rollup-plugin-dts-path-alias","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/rollup-plugin-dts-path-alias","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-18","next_check":"2026-07-26","install_tag":null}}