How to change function to export function for decorator?

I have an angular project where I am importing a module using the following code in app.module.ts:

 imports: [
     echarts: () => import('echarts')

But when I am trying to build the project into serverless, I am getting the following regarding the above import and asking me to change it to export function so that it can be supported by decarator. How do I do that? I tried different export approaches but it is not working.

ERROR in src/app/app.module.ts(107,16): Error during template compile of 'ɵ0'
  Function expressions are not supported in decorators
    Consider changing the function expression into an exported function.

For reference, I am trying to import ngx-echarts into angular project.

Thank you for any help.

Source: Angular Questions