Allow customizing the remoteEntry.mjs
file name
#26784
gibsonjoshua55
started this conversation in
Feature Requests
Replies: 1 comment
-
We are currently solving this with the following workaround, it's not pretty but it works import { withModuleFederation } from '@nx/module-federation/angular';
import moduleFederationConfig from './module-federation.config';
export default async (config: any) => {
const fromModuleFederation = await withModuleFederation(
moduleFederationConfig,
{ dts: false }
);
config = fromModuleFederation(config);
// Workaround to change the name of the remoteEntry file
config.plugins.find(
(p: any) => p.constructor.name === 'ModuleFederationPlugin'
)._options.filename = 'customRemoteEntry.js';
return config;
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Most other aspects of builds are customizable through either the executor options or webpack config. This file name, however is difficult to adjust. Because it is set statically in the instantiation of the
ModuleFederationPlugin
in thewithModuleFederation
function, even wrapping that function doesn't easily allow that filename to be changed.It would be great if we could set that filename in the
ModuleFederationConfig
options that we pass into that function. That way if a particular project needs that file renamed, we can do so without an additional build steps or overriding configurations.Beta Was this translation helpful? Give feedback.
All reactions