@nuskin/react-product-components
v1.1.10
Published
Product domain UI component library and Storybook
Readme
@nuskin/react-product-components
Product-domain npm component library with Storybook for pure UI. The repository also contains work-in-progress Module Federation and SSR scaffolding modeled on ~/src/header-mfe.
See docs/architecture.md for the full layout.
See CONTRIBUTING.md for code quality and review standards.
Outputs
| Output | Location | Notes |
|--------|----------|--------|
| MFE static assets + remoteEntry.js | dist/ | Work in progress; not a stable host integration |
| SSR server bundle + manifest | dist/server/ | Work in progress; consumed locally by server-launcher.js |
| Storybook static | dist/storybook/ | UI-only stories under src/components/** |
| npm package | package-dist/ | yarn build:package |
Scripts
| Command | Description |
|---------|-------------|
| yarn install | Install dependencies |
| yarn test | Jest + coverage |
| yarn lint | ESLint src/ |
| yarn build:local | Dev server + client webpack + Storybook static |
| yarn start | Rebuild on src/ changes, then node server-launcher.js (Express on port 3000) |
| yarn build-prod | Production client + server (no Storybook) |
| yarn build:package | Library → package-dist/ |
| yarn storybook | Storybook dev server on port 6006 |
Library usage
import { ProductCard, ProductCarousel } from '@nuskin/react-product-components';
import '@nuskin/react-product-components/index.css';Host integration (Module Federation, work in progress)
| Item | Value |
|------|--------|
| Remote name | product_mfe |
| Public path | /static/product-mfe/ |
| Exposed module | ./App |
License
MIT
