Skip to content

ts-transform-paths does not work at all. #40

@lemiesz

Description

@lemiesz

Here is my ts config

{
  "compileOnSave": true,
  "noEmit": true,
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@app/*": ["src/*"]
    },
   "plugins": [
            { "transform": "typescript-transform-paths", "afterDeclarations": true }
      ],
    "lib": ["dom", "ES6"], 
    "skipLibCheck": true,
    "module": "commonjs",
    "outDir": "dist",
    "sourceMap": true,
    "target": "es6",
    "types": ["jest", "node"],
    "isolatedModules": false,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "noImplicitAny": true,
    "preserveConstEnums": true,
    "suppressImplicitAnyIndexErrors": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "incremental": true,
    "allowJs": true
  },
  "include": ["src/**/*.ts"]
}

im calling it with the following command

        "compile": "rm -rf ./dist/* && ttsc -p tsconfig.build.json",

However it just does not rewrite my paths at all.

My JS gets compiled with all the @app/ declarations.

library versions

        "tsconfig-paths": "^3.14.0",
        "ttypescript": "^1.5.13",
        "typescript": "^4.6.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions