Unexpected value 'MyCustomModule' imported by the module 'AppModule'
in myCustomLib.js
, try to import before exporting
import { MyCustomModule } from './lib/myCustomLib.module;export MyCustomModule;
Add the lib folder to your webpack configuration for resolving modules.The path should be relative to the location of the webpack config file.
resolve: { modules: ['node_modules','lib']
your MyCustomModule should be inside the src/app folder as it is not recognised by compiler because compiler, compiles all the files in the src folder ,thats why it is not recognising your module