0

I'm having a hard time to understand why @angular compiler changes my modules names:

directive.ts

import isNil from 'lodash-es/isNil';
...
@Directive({
  selector: '[aColor]',
})
export class AColorDirective { }

tsconfig.aot.json

{
  "compilerOptions": {
    ...
    "module": "es2015",
    "moduleResolution": "node",
    "lib": [
      "es2015",
      "dom"
    ],
    "target": "es2015",
    "outDir": "./lib-es2015",
    "baseUrl": "."
  },
  "files": [
    "./directive.ts"
  ],
  "angularCompilerOptions": {
    "strictMetadataEmit": true,
    "skipTemplateCodegen": true,
    "annotateForClosureCompiler": true,
    "genDir": "./lib-es2015",
  }
}

then I run @angular/compiler by using the cli as ngc -p tsconfig.aot.json. I get this as result which doesn't make any sens.

directive.js

import isNil from 'lodash-es/isNil/index';
...

Does anyone know why this happens, or how to fix this. This makes it impossible for Rollup to resolve these modules.

Angular compiler: v4.2.4

Angular compiler-cli: v4.1.3

PRAISER
  • 793
  • 7
  • 15

0 Answers0