Skip to content
This repository was archived by the owner on Jul 23, 2020. It is now read-only.
This repository was archived by the owner on Jul 23, 2020. It is now read-only.

fabric8-ui webpack config ignores nested node_module packages #3686

@christianvogt

Description

@christianvogt

The current webpack configuration is setup to resolve node_modules only at the root level in fabric8-ui. This means that when libraries that depend on another library, fabric8-ui must also ensure it has an equivalent dependency so that it gets installed at the root (unless it's the only library of that version in the install). This means that a library cannot depend a version of a library that differs in version from fabric8-ui because the one defined by fabric8-ui will be forced to be used. This may have runtime consequences such as incompatible API.

Changing the current module resolution will impact:

  • bundle size if multiple versions of libraries are defined in components and their package.json dependencies aren't specified correctly with ranges
  • npm link for testing downstream components within fabric8-ui

The bundle size, although important to keep small, can be addressed as we find dependency discrepancies. We should aim to ensure that we correctly use ranges for dependencies so that libraries can be shared correctly.

Linking libraries for inclusion into fabric8-ui for development must continue to work.

  • Create PRs for all projects to use peer dependencies
  • Merge all PRs that update project peer dependencies
  • All projects that depend on other project(s) whose dependencies are moving to peer dependencies should update their dependency versions to point to the latest.
  • Update fabric8-ui with latest versions of related projects
  • Merge fabric8-ui webpack changes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions