Strange error with webpack compilation:
ERROR in Must have a source file to refactor.
Looking at the source code I found this message in ./node_modules/@ngtools/refactor.js
:
...
if (!sourceFile) {
throw new Error('Must have a source file to refactor.');
}
The configuration of @ngtools webpack plugin is pretty straightforward:
{
test: /\.ts$/,
use: '@ngtools/webpack',
}
@angular/cli
to 6 beta version, I started seeing this issue when I was usingngIvy
with angular 6 rc – Confirm