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

Option to exclude peer dependencies + package composition #22

Closed
atomiks opened this issue May 1, 2022 · 7 comments
Closed

Option to exclude peer dependencies + package composition #22

atomiks opened this issue May 1, 2022 · 7 comments

Comments

@atomiks
Copy link

atomiks commented May 1, 2022

@floating-ui/react-dom is ~5 kB with everything exported, but displays 52.2 kB because React+React DOM are included in the bundle.

Further, a breakdown of the package composition would be good (like webpack-bundle-analyzer) to see which dependencies are the largest of a package. That would make this more obvious

@atomiks
Copy link
Author

atomiks commented May 1, 2022

I just saw #13 is about peerDependencies. Clicking the settings icon and adding them to the "external" key works:

"esbuild": {
  "external": ["react", "react-dom"],

@okikio maybe add this to the docs?

The package composition feature would still be cool though 👍

@okikio
Copy link
Owner

okikio commented May 1, 2022

I'm currently working on a massive blog posts that will detail all the hidden features in bundlejs.

You may not know this but you can also use aliases in bundlejs.

{
    "aliases": { "@okikio/animate": "react-dom" },
    "esbuild": { ... }
}

I'll look into a package composition analyzer.

@okikio
Copy link
Owner

okikio commented May 1, 2022

The source of difficulty in implementing a package composition analyzer is the creation of a graph, I'd appreciate it if you or really anyone could design a graph for it, it's quite a bit of work....Lol 😅.

@atomiks
Copy link
Author

atomiks commented May 2, 2022

@okikio 😰 I have no experience in this area so if it's too hard feel free to close

@okikio
Copy link
Owner

okikio commented May 2, 2022

@atomiks I've put out a call to collaborate, maybe share it around with other peeps and lets see if we can make magic happen.

twitter.com/jsbundle/status/1520921432112443392

@okikio
Copy link
Owner

okikio commented May 2, 2022

@atomiks I've found someone willing to collaborate with me to implement a package composition graph.

Also, I've added docs about aliases and externals to bundlejs

@okikio
Copy link
Owner

okikio commented Aug 5, 2022

Since, this feature is already public, I'll close this

@okikio okikio closed this as completed Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants