'import package that using module federation

I have a package that is being used as remote package of moudule federation machanism. so when I build the package using webpack I get a build folder with remote-entry.js file in it. I also want that other package will be able to consume this package using npm. but I don't have index.js file in my build folder , only remote-entry file.

how to I build my package that it will be consumed both by module federation and as npm package. ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source