Skip to content

Error message on valid dynamic import #74779

@graphicsxp

Description

@graphicsxp

This bug is the same as #70806 (but this one is closed and I cannot folllow-up on it).

I've just upgraded from Angular 7 to Angular 8, which now supports dynamic import for lazy-loaded modules :

{ path: 'task', loadChildren: () => import('../tasks/tasks.module').then(m => m.TasksModule) },

which gives the error :

Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.ts(1323)

This is because the tsconfig file in my source code directory is named tsconfig.app.json instead of tsconfig.json
However this is the Angular naming convention so I cannot change it.

Could this be handled by VSCode ?

Metadata

Metadata

Assignees

Labels

typescriptTypescript support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions