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(bundle): support autoExternal configuration #74

Merged
merged 12 commits into from
Aug 9, 2024
Merged

Conversation

9aoy
Copy link
Contributor

@9aoy 9aoy commented Aug 8, 2024

Summary

support automatically externalize project dependencies and peerDependencies and not package them into the final bundle.

type AutoExternal =
  | boolean
  | {
      dependencies?: boolean;
      devDependencies?: boolean;
      peerDependencies?: boolean;
    };

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@9aoy 9aoy requested a review from Timeless0911 August 8, 2024 09:34
@Timeless0911
Copy link
Collaborator

Can we update examples externals config?

packages/core/src/utils/external.ts Outdated Show resolved Hide resolved
packages/core/src/utils/external.ts Outdated Show resolved Hide resolved
packages/core/src/utils/external.ts Outdated Show resolved Hide resolved
@9aoy
Copy link
Contributor Author

9aoy commented Aug 8, 2024

Can we update examples externals config?

The example scenario is not yet supported. When we external react, react/jsx-runtime will not be externalized. And I think autoExternal should support this feature (next PR).

@chenjiahan
Copy link
Member

When we external react, react/jsx-runtime will not be externalized.

Why is react/jsx-runtime not externalized, I thought it should work.

@9aoy 9aoy requested a review from fi3ework August 9, 2024 03:31
@9aoy
Copy link
Contributor Author

9aoy commented Aug 9, 2024

Why is react/jsx-runtime not externalized, I thought it should work.

done

@9aoy 9aoy merged commit 5e5aeff into main Aug 9, 2024
4 checks passed
@9aoy 9aoy deleted the feat/auto-externals branch August 9, 2024 04:33
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