After upgrading to angular 8 started getting issues with the build saying d3 document of undefined. I saw a post solving the issue but I really want to know why its happening and why the issue wasn't happening during angular 7. The quick fix to switch the target es2015 to es5. Below are the versions of d3 that I have right now.
// package.json
"nvd3": "^1.8.6",
"d3": "3.5.17",
// tsConfig.json
{
"compilerOptions": {
"target": "es5",
"module": "esnext",