Skip to content

Support for External Template Remotes Plugin #2

@mcarlotta

Description

@mcarlotta

This is more of a support question / feature enhancement than a Issue

With this utilizing withModuleFederation, I noticed endpoints need to be hardcoded. For my use case, utilizing External Template Remotes Plugin for versioning is required. Simply updating the endpoint via remote config is more desirable than having to hardcode the endpoint in webpack and having to re-deploy the application each time. This results in more fragility and longer deployment times.

Is there a way to invoke this plugin?

Tried doing a custom webpack build which sort of works with the dynamic remotes but it seems to not do much of anything else which comes along with the withModuleFederation method such as properly chunking, etc

example:

module.exports = (config, context) => merge(config, {
    module: {
      rules: [
        {
          test: /\.svg$/i,
          issuer: /\.[jt]sx?$/,
          use: ['@svgr/webpack'],
        },
      ],
    },
    plugins: [
      new ModuleFederationPlugin({
        name: 'host-client',
        filename: 'remoteEntry.js',
        remotes: {
          header: 'header@[mfeHeaderRemoteUrl]/remoteEntry.js',
          mpi: 'mpi@[mfeMpiRemoteUrl]/remoteEntry.js',
          wiseboard: 'wiseboard@[mfeWiseboardRemoteUrl]/remoteEntry.js',
        },
      }),
      new ExternalTemplateRemotesPlugin(),
    ],
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions