Replies: 3 comments 2 replies
-
Running into same issue with our component library import { Button } from 'component-library'; gives below error
Trying the suggestion, throws below
Managed to get it working doing this import * as pkg from '@envestnet/envreact-component-library';
const { Button } = pkg; Note: Vite SPA works fine with named imports. It's only remix vite that has the issue. |
Beta Was this translation helpful? Give feedback.
-
Do these imports fail in |
Beta Was this translation helpful? Give feedback.
-
Going to close this since we're tracking in #8507 but this is usually an issue with the dependency, not Remix. See https://remix.run/docs/en/main/future/vite#esm--cjs for more information. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently testing out the SPA mode with Remix. I have
react-icons
installed, and by the looks of it the build process for client SPA fails because Vite throws error about CommonJs.import { BiCog, BiHide, BiShowAlt, BiSearchAlt, BiCommentDetail, BiDotsVerticalRounded, BiSolidEditAlt, BiSearch, BiNetworkChart, BiBarChartSquare, BiUserPlus } from "react-icons/bi/index.esm.js"; ^^^^^^^^^^^^^^^^ SyntaxError: Named export 'BiBarChartSquare' not found. The requested module 'react-icons/bi/index.esm.js' is a CommonJS module
Beta Was this translation helpful? Give feedback.
All reactions