import { ModuleFederationConfig } from '@nx/rspack/module-federation';

const config: ModuleFederationConfig = {
    name: '<%= projectName %>',
    /**
     * To use a remote that does not exist in your current Nx Workspace
     * You can use the tuple-syntax to define your remote
     *
     * remotes: [['my-external-remote', 'https://nx-angular-remote.netlify.app']]
     *
     * You _may_ need to add a `remotes.d.ts` file to your `src/` folder declaring the external remote for tsc, with the
     * following content:
     *
     * declare module 'my-external-remote';
     *
     */
    remotes: [
            <% if (static) { 
         remotes.forEach(function(r) { %> "<%= r.fileName %>", <% }); 
       }
    %>
  ],
};

export default config;
