Skip to content
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

Custom paths not working #7

Open
chrillewoodz opened this issue Aug 14, 2017 · 1 comment
Open

Custom paths not working #7

chrillewoodz opened this issue Aug 14, 2017 · 1 comment

Comments

@chrillewoodz
Copy link

When setting custom paths they don't seem to work, I think it's because of AOT but I'm not sure. It breaks both when I build the project and when I test it. I use the same paths in my CLI project and it works fine so I guess there's some config missing in this project but I haven't been able to figure out what.

I use this tsconfig:

{
  "compilerOptions": {
    "baseUrl": ".",
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "noEmit": true,
    "sourceMap": true,
    "declaration": false,
    "noImplicitAny": false,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "lib": [
      "es2015",
      "dom"
    ],
    "typeRoots" : [
      "./node_modules/@types"
    ],
    "types": [
      "jasmine",
      "karma",
      "node",
      "webpack",
      "webpack-env"
    ],
    "paths": {
      "@shared/*": ["src/*"],
      "@components/*": ["src/components/*"],
      "@directives/*": ["src/directives/*"],
      "@modules/*": ["src/modules/*"],
      "@pipes/*": ["src/pipes/*"],
      "@validators/*": ["src/validators/*"]
    }
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "src/**/*.spec.ts",
    "node_modules",
    "demo",
    "dist"
  ]
}

@bobrosoft
Copy link
Contributor

@chrillewoodz I'm not using custom paths there and all's fine. Why do you need them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants