Skip to content

Commit

Permalink
Update rspack.module-federation.config.mjs.ejs
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Sep 19, 2024
1 parent a41f7d9 commit dad9ac9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
import { dependencies } from './package.json' assert { type: 'json' };
import packageJson from './package.json' assert { type: 'json' };

// Microfrontend api, should match across gateway and microservices.
const apiVersion = '0.0.1';
Expand All @@ -26,7 +26,7 @@ const shareMappings = (...mappings) => Object.fromEntries(mappings.map(map => [m

const shareDependencies = ({ skipList = [] } = {}) =>
Object.fromEntries(
Object.entries(dependencies)
Object.entries(packageJson.dependencies)
.filter(([dependency]) => !skipList.includes(dependency))
.map(([dependency, version]) => [dependency, { ...sharedDefaults, version, requiredVersion: version }]),
);
Expand Down

0 comments on commit dad9ac9

Please sign in to comment.