vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 762 forks source link

Creat React App / Webpack 5 #6622

Closed coryrylan closed 2 years ago

coryrylan commented 2 years ago

Describe the bug

A clear and concise description of what the bug is, and the conditions when it occurs.

How to reproduce

Steps to reproduce the behavior:

yarn create react-app test
cd test
yarn add @cds/core @cds/city @cds/react
yarn install --check-files

Expected behavior

With Webpack 5 import paths must require a .js extention on the end of file imports. https://github.com/vmware/clarity/pull/5714 but then a regression re-introduced later

All imports in the @cds/react library that are a path to a direct file need to have the .js extention. Most are the following path

import { logReactVersion } from '../utils/index';

https://github.com/vmware/clarity/blob/next/packages/react/src/badge/index.tsx#L5

Versions

Clarity project:

Clarity version:

Framework:

Framework version: ie: Angular 11

Device:

Additional notes

Add any other notes about the problem here.

mathisscott commented 2 years ago

This should be fixed in #6627

coryrylan commented 2 years ago

Opened separate issue here https://github.com/vmware/clarity/issues/6695, thought this was a duplicate

github-actions[bot] commented 2 years ago

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.