An untouched fork of the Angular 2 webpack boilerplate on Github called Angular 2 webpack boilerplate is causing WebStorm to report an error. The error message pertains to the App in the line
import {App} from './components/index';
found in the file lib/index.ts. The error message states Corresponding file is not included in tsconfig.json
. However, running webpack-dev-server
does not produce any errors and the application runs smoothly in the browser.
The error can be resolved by removing the following snippet from tsconfig.json:
"files": [
"lib/index.ts"
]
After making this adjustment, the error disappears and the application continues to function correctly (even after restarting webpack-dev-server
). However, just before the message webpack: bundle is now VALID.
appears, multiple errors are displayed indicating
... error TS2300: Duplicate identifier ...
, although the application still operates without issues.
The question remains - how can both WebStorm and webpack be satisfied with the setup?