muhammadarsal / ng-select2

Angular 4 wrapper for jQuery select2
7 stars 39 forks source link

Module Build Failed Error: `index.ts is not part of the compilation output` #6

Open mypark opened 6 years ago

mypark commented 6 years ago

I'm getting the following error on build with angular 5:

node_modules/ng-select2/index.ts is not part of the compilation output. Please check the other error messages for details.

icecoldfire commented 6 years ago

See: #https://github.com/angular/angular/issues/20091

You can fix this by adding this code in your tsconfig.json file:

"include": [
    "src/**/*.ts",
    "node_modules/ng-select2/index.ts"
  ]

complete file:

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  },
  "include": [
    "src/**/*.ts",
    "node_modules/ng-select2/index.ts"
  ]
}
icecoldfire commented 6 years ago

18 can permanently fix these and give aot support