ithaka/pharos

Individual component imports regression

Closed this issue · 0 comments

Expected behavior
Importing individual components should work in pharos v14.

Actual behavior
Attempting to individually import a pharos component in v14 throws the following error:
Missing "./lib/components/alert/pharos-alert" specifier in "@ithaka/pharos" package

Steps to reproduce the issue

  1. Upgrade or find a project that uses pharos v14.
  2. Import an individual pharos component from its path in the pharos package like so import { PharosButton } from "@ithaka/pharos/lib/components/button/pharos-button";.
  3. Try to run your project locally.

Pharos version
14.2.0

Your environment

  • OS: macOS

Additional information
The inability to import individual pharos components in v14 prevents proper module sharing and bloats the application. Even if your project only imports a few components from the pharos package, all of pharos will be imported as a single chunk in your project.