Closed atomiks closed 2 years ago
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 👍
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.
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 😅.
@okikio 😰 I have no experience in this area so if it's too hard feel free to close
@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.
@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
Since, this feature is already public, I'll close this
@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