fuse-box / fuse-box-npm-package-seed

Get started creating npm package with FuseBox module loader and bundler
MIT License
4 stars 3 forks source link

Duplication of dependencies #3

Open RPDeshaies opened 7 years ago

RPDeshaies commented 7 years ago

In the README, it says

  .instructions("> index.ts")
Notice the > arithmatic symbol above? it is important to make fuse expose your exports.

Isn't that going to duplicate all the dependencies inside the package ?

So if your application and one of your dependency is using lodash, it's going to be included twice in your project since your dependency was built by Fusebox?

RPDeshaies commented 7 years ago

As another example, I just created a npm package that contains a bunch of reusable React components, but because of this, React and ReactDOM are included twice in my project which causes a bunch of errors at run time

Error: Unable to find node on an unmounted component.

Note: I say that this error is linked to including ReactDOM twice because of this:

https://github.com/Pomax/react-onclickoutside/issues/231#issuecomment-333174275

nchanged commented 6 years ago

@RPDeshaies use the latest FuseBox, it will get TypeScript source instead of a bundle. And then all of your issues will be resolved

RPDeshaies commented 6 years ago

2.4.0 ?

nchanged commented 6 years ago

fuse-box@3.0.0-next.26