Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utilities): expose esm from package json #2818

Merged

Conversation

tzachbon
Copy link
Contributor

@tzachbon tzachbon commented Aug 3, 2024

Description

This PR modifies the package.json to expose the ESM files from the "utilities" package, using similar patterns as the "runtime" package. This change will help Webpack perform tree-shaking more effectively.

The import:

import { importRemote as importRemoteUtility } from '@module-federation/utilities';

See numbers in the following images:
Before
mf-utilitize-before

After
mf-utilitize-after

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

Copy link

changeset-bot bot commented Aug 3, 2024

🦋 Changeset detected

Latest commit: eb95aaa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@module-federation/utilities Minor
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/storybook-addon Major
@module-federation/modern-js Patch
modernjs-ssr-dynamic-nested-remote Patch
modernjs-ssr-dynamic-remote-new-version Patch
modernjs-ssr-dynamic-remote Patch
modernjs-ssr-host Patch
modernjs-ssr-nested-remote Patch
modernjs-ssr-remote-new-version Patch
modernjs-ssr-remote Patch
@module-federation/runtime Patch
@module-federation/enhanced Patch
@module-federation/rspack Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
3008-runtime-remote Patch
host Patch
host-v5 Patch
host-vue3 Patch
remote1 Patch
remote2 Patch
remote3 Patch
@module-federation/modernjs Patch
@module-federation/esbuild Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Aug 3, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit eb95aaa
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/66ae9b90fa1ce90008866ee5
😎 Deploy Preview https://deploy-preview-2818--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tzachbon tzachbon changed the title feat: expose esm from utilities package feat(utilities): expose esm from package json Aug 3, 2024
@zackarychapple
Copy link
Collaborator

Nice catch

@zhoushaw zhoushaw merged commit bb1e471 into module-federation:main Aug 5, 2024
9 checks passed
@ScriptedAlchemy
Copy link
Member

Utils is deprecated and should not be used.

@2heal1 2heal1 mentioned this pull request Aug 6, 2024
@tzachbon
Copy link
Contributor Author

tzachbon commented Sep 1, 2024

Utils is deprecated and should not be used.

@ScriptedAlchemy what is the suggested alternative to load remotes dynamically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants