Skip to content

No changes when using npm link #646

Open
@mbohal

Description

@mbohal

Steps:

  1. Clone RUI and consumer application (APP)
  2. Make APP use dist version of RUI (the import { Button } from '@react-ui-org/react-ui'; syntax )
  3. Use npm-link in APP to force it to use RUI source (see: https://react-ui.io/docs/contribute/general-guidelines/#package-linking)
  4. Start RUI dev server npm start / docker compose up node_dev_server
  5. Make changes in RUI

Expected behaviour: RUI changes are reflected in APP
Current behaviour: RUi changes are not reflected in APP

Cause

In RUI the npm start (=webpack --watch) script builds to the folder src/docs/_assets/generated/, but APP expects the output to be in dist. The sources are only copied to the dist folder in npm posbuild script.

Solution

As we can not drop outputting the build source to src/docs/_assets/generated/ as it is needed for mkdocs docs, so we need to do one of the following:

  • use symlink
  • output from webpack to two locations

The decision is up to the author and it should be documented in an ADR (use same structure as in RA2W).

Documentation might need to be updated accordingly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🔖 To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions