Closed fathert closed 5 years ago
@hansl can you weigh in?
Mike saw the "Uncaught Reference
" error earlier, and we investigated but it just went away when nuking node_modules
and reinstalling.
Default exports might not work with ngc
, we need to investigate. @fathert any reason you need to use default there?
Hi there, no, there's no reason I need it, I was following a tutorial which used "default" in preference to the hash notation that's all.
+1
@fathert can you still reproduce this issue with the latest CLI?
Closing the issue due to inactivity. If the problem still exists in the latest version of the CLI, please open a new issue following the template and providing a minimal demo where we can reproduce it. Thanks! :-)
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
OS?
Windows 7
Versions.
Repro steps.
App created using Angular CLI. Running ng build prod gives the following warnings when lazy loaded modules use the "default" class keyword instead of specifying the class with the hash prefix in the route.
The resulting app won't run.
The log given by the failure.
Mention any other details that might be useful.
Removing the default keyword from the module class:
export default class LoginModule { }
...and using the hash notation in the route config solves the problem:
{ path: 'login', loadChildren: './login/login.module#LoginModule' },
Thee issue only affects prod builds.