Problems related to webpack Packaging

1, Project A depends on component library B, which is based on react or vue. So will the package include two react or vue?
2. What if you depend on a different version of the framework? For example, An is based on react 15 and B is based on react 16?
3. If you want to learn the basic knowledge above, what materials do you recommend?


  1. not necessarily, it depends on whether B writes React in dependencies. If it is in dependencies, it will have its own separate react, and there will be two React. However, it is still possible to change the configuration of webpack to make AMagi B rely on the same React.
  2. There will be two copies of the
  3. theory, if the component library relies on a fixed version of React.
  4. there are many aspects involved here, and you can learn about dependencies and modules through the official documentation of Webpack and Npm.
Menu