herodevs / herodevs-packages

This project is where HeroDevs develops our public npm packages.
57 stars 14 forks source link

Fails to load module when using --prod #36

Open abhishek-g opened 3 years ago

abhishek-g commented 3 years ago

Hi,

So i used the component to dynamically load a module , this works in my dev build , but the moment i switch it too --prod build , this stops working and in console , i get the error that the module was not found.

Any help will be appreciated on this.

Error i am Getting main.js?version=6.1.8.912:1 ERROR Error: Uncaught (in promise): Error: Cannot find module 'src/app/ngn/campaigns/broadcast/campaign/modules/apn-content/apn-content.module.ngfactory' Error: Cannot find module 'src/app/ngn/campaigns/broadcast/campaign/modules/apn-content/apn-content.module.ngfactory'

How i have used the component <hero-loader *ngIf="channel === 'apn' && activeComponent === 'content'" moduleName="src/app/ngn/campaigns/broadcast/campaign/modules/apn-content/apn-content.module#ApnContentModule"></hero-loader>