Webpack Module Federation - no version specified
Hi!
In my setup, @mobiscroll\[email protected] is a shared singleton in Webpack Module Federation.
I'm getting the following console warning:
No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file <my-project>\node_modules\@mobiscroll\angular-ivy\dist\esm5\package.json, or manually specify version in shared config.
The issue is that Webpack doesn't go upstream to @mobiscroll/angular-ivy/package.json to get the MobiScroll version.
The solution is to add the version number to dist/esm5/package.json at build time.
This issue in Webpack may be relevant.
For anyone needing a temporary workaround to get rid of the console warning in your production app, add requiredVersion: '*' to your Module Federation options for @mobiscroll/angular-ivy