styled-icons: Problem using named imports (fa-solid)
Describe the bug The error is being shown when bundling the app and using the example import shown below:
import { User, SignOutAlt, AngleDown } from 'styled-icons/fa-solid';
Image of the error tsconfig.json
Using the .cjs imports work fine but we are dragging a lot of unused icons (all icons from fa-solid) and that’s not the desired solution:
import { User, SignOutAlt, AngleDown } from 'styled-icons/fa-solid/index.cjs.js';
Updating the library version to the latest one didn’t fix the issue.
Expected behaviour Bundle only the imported icons without any errors.
System:
- OS: MacOS
- Device: Macbook Pro 2018
- Typescript:
"typescript": "^3.1.1", - Version:
"styled-icons": "5.1.0",
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (8 by maintainers)
Thanks, it works fine on my end now after updating to v7.0.0 and changing the imports.