I\'m converting a project to use angular cli and everything is working (once it\'s build) but i\'ve got a weird behaviour during build.
with ng serve I
ng serve
I had the same error, but my requirement was to have all the routes in a separate file. I solved it by simply exporting my Routes[] like this:
export const routes: Routes = [ // ... all my route objects ];