I've JS files/library included in my Angular project and it is inside my assets folder. Previously on angular 4 or 2, I have no issues setting AllowJS to true in the compiler options but when I updated to Angular 5 (CLI + Typescript) it doesn't work and it says
error TS5055: Cannot write file '<a path/afile.js>' because it would overwrite input file.
Solely including the allowJS (no imports on my typescript files) triggers the error when on ng serve or ng build.
Furthermore, removing it successfully serves/builds my project but I need to allowJS.
Here's my tsconfig.app.json
{
"extends": "../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
Here's my angular version + other info
Angular CLI: 1.5.4
Node: 8.9.1
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular/cdk: 5.0.0-rc.1-6e865b7
@angular/cli: 1.5.4
@angular/language-service: 4.4.6
@angular/material: 5.0.0-rc.1-6e865b7
@angular-devkit/core: 0.0.21
@angular-devkit/schematics: 0.0.37
@schematics/angular: 0.1.7
typescript: 2.4.2
webpack: error
Please help as other solution and this doesn't work. Thanks!