Closed 0xRowdy closed 10 months ago
@FrozenPandaz Wondering if you had a chance to look at the Project.json or test out the issue locally? Anything I can do to further support you?
This issue can be replicated by creating a project with an expo app and trying to use UI Kittens and trying to run the application in "web" mode: https://akveo.github.io/react-native-ui-kitten/docs/guides/getting-started#manual-installation
This issue can be replicated by creating a project with an expo app and trying to use UI Kittens and trying to run the application in "web" mode: https://akveo.github.io/react-native-ui-kitten/docs/guides/getting-started#manual-installation
Thanks for bumping my ticket. You are having a similar issue in the repo you linked?
Yes! But the link is to the library that I've used to cause the issue (UI Kittens). If it helps, I can create a repo with the issue.
Bump
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Created a Component Library in monorepo that uses React Icons. When testing the component library in a local Create React App with Typescript I get the following error:
dist/libs/ui includes index.cjs and index.js even though "format": ["esm", "umd"], is specified in project.json
Expected Behavior
Local test Create React App renders and allows the use of React Icons. Build should include index.esm.js instead of index.cjs SourceMaps should be generated.
Github Repo
https://github.com/HausDAO/monorepo/tree/bug/web-rollup-bundle-error/libs/ui
Steps to Reproduce
git clone -b bug/web-rollup-bundle-error git@github.com:HausDAO/monorepo.git
Install packages:
yarn install
Build ui:
yarn nx build ui
In another folder create a test React Application with Create React App:
yarn create react-app build-test --template typescript
Install react router:
yarn add react-router-dom
Copy the path from HausDAO monorepo dist/libs that was created in step 3.
In build-test CRA install @daohaus/ui from monorepo: '/Users/rowdy/Documents/Development/DAOs/monorepo/dist/libs/ui'
In build-test CRA index.ts import HausThemeProvider and use: ` import React from "react"; import ReactDOM from "react-dom/client"; import "./index.css"; import App from "./App"; import reportWebVitals from "./reportWebVitals"; import { HausThemeProvider } from "@daohaus/ui";
const root = ReactDOM.createRoot( document.getElementById("root") as HTMLElement ); root.render(