Skip to content

Commit

Permalink
fix: @remote-types path in generated typings file
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-pribilinskiy committed Jul 21, 2022
1 parent e9293ea commit 76964b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,11 @@ This way downloaded types will always correspond to the latest compatible versio

## Plugin Options

| Option | Value | Default | Description |
|-----------------------------------:|:--------------------:|:---------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `cloudbedsRemoteManifestsBaseUrl` | `string` | | Base URL for remote manifest files (a.k.a remote entry configs) that is specific to Cloudbeds microapps <br><br> _Examples:_ <br> `http://localhost:4480/remotes/dev` <br> `https://cb-front.cloudbeds-dev.com/remotes/[env]` <br> `use-devbox-name` |
| `doNotUseCloudbedsRemoteManifests` | `boolean` | `false` | This plugin was built to be configuration-less for Cloudbeds microapps. This can be disabled if necessary. In that case the `cloudbedsRemoteManifestsBaseUrl` is ignored |
| `syncTypesIntervalInSeconds` | `number`, `0`, `-1` | `60` | Synchronize types continusouly with a specified value in seconds. <br><br> `0` - disables continuous synchronization. <br> `-1` - disables the plugin |
| `remoteManifestUrls` | `RemoteManifestUrls` | | URLs to remote manifest files. A manifest contains a URL to a remote entry that is substituted in runtime. Multiple remote entries is supported via `registry` field. <br><br> More details available in [this section](#templated-remote-urls) |
| Option | Value | Description |
|----------------------------------:|:--------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `cloudbedsRemoteManifestsBaseUrl` | `string` | Base URL for remote manifest files (a.k.a remote entry configs) that is specific to Cloudbeds microapps <br><br> _Examples:_ <br> `http://localhost:4480/remotes/dev` <br> `https://cb-front.cloudbeds-dev.com/remotes/[env]` <br> `use-devbox-name` |
| `syncTypesIntervalInSeconds` | `number`, `0`, `-1` | Synchronize types continusouly with a specified value in seconds. <br><br> `0` - disables continuous synchronization. <br> `-1` - disables the plugin |
| `remoteManifestUrls` | `RemoteManifestUrls` | URLs to remote manifest files. A manifest contains a URL to a remote entry that is substituted in runtime. Multiple remote entries is supported via `registry` field. <br><br> More details available in [this section](#templated-remote-urls) |

## Templated Remote URLs

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudbeds/webpack-module-federation-types-plugin",
"version": "1.3.0",
"version": "1.2.0",
"description": "Webpack module federation tools to share types among module-federated apps/components",
"license": "UNLICENSED",
"author": "Stepan Prybylynskyi <stepan.prybylynskyi@cloudbeds.com>",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/compileTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function rewritePathsWithExposedFederatedModules(

let federatedModulePath = exposePath
? `${federationConfig.name}/${exposePath}`
: `${federationConfig.name}@remote-types/${importPath}`;
: `@remote-types/${federationConfig.name}/${importPath}`;

federatedModulePath = federatedModulePath.replace(/\/index$/, '')

Expand Down

0 comments on commit 76964b1

Please sign in to comment.