Comments (18)
thanks @wootsbot, it solved the situation.
I was wondering, would it be a possible to import icons individually?
import SiGithub from "@icons-pack/react-simple-icons/Github" //or something
This has the advantage of being very explicit, while also giving faster build times because the bundler does not have to tree shake the entire package in every file where an icon is imported (looking at you MUI).
from react-simple-icons.
@AbdBarho I'm working on a compiled refactor, I think at the moment it can help to solve
This works for now. Hoping to see a proper resolution for the v7s soon
from react-simple-icons.
@AbdBarho I'm working on a compiled refactor, I think at the moment it can help to solve
from react-simple-icons.
@AbdBarho I'm working on a compiled refactor, I think at the moment it can help to solve
#140 (comment)This works for now. Hoping to see a proper resolution for the v7s soon
This has been resolved in version v8.0.1.
from react-simple-icons.
Is simple-icons/simple-icons#8112 possibly related? I can confirm that this is an issue for me and prevents my Remix app from deploying on CF Pages (bundle size is > 1MB when using a few icons).
Edit: Downgrading to 5.11 fixes the issue.
from react-simple-icons.
@aflatter @skyclo I am checking with version v7.1.1 I have a tree correctly
Just tried 7.1.1, same problem:
foo@bar aflatter % npm run build
> [email protected] build
> next build
info - Linting and checking validity of types
info - Compiled successfully
info - Collecting page data
info - Generating static pages (4/4)
info - Finalizing page optimization
Route (pages) Size First Load JS
┌ ○ / 1.63 MB 1.71 MB
├ /_app 0 B 73.3 kB
├ ○ /404 182 B 73.4 kB
├ ○ /about 1.6 kB 80.1 kB
└ λ /api/hello 0 B 73.3 kB
+ First Load JS shared by all 75.6 kB
├ chunks/framework-2c79e2a64abdb08b.js 45.2 kB
├ chunks/main-0ecb9ccfcb6c9b24.js 27 kB
├ chunks/pages/_app-ae907860a06fe57a.js 296 B
├ chunks/webpack-8fa1640cc84ba8fe.js 750 B
└ css/5983c06de8f68d75.css 2.37 kB
foo@bar aflatter % git diff package.json
diff --git a/package.json b/package.json
index 572584b..78a7a57 100644
--- a/package.json
+++ b/package.json
@@ -9,21 +9,21 @@
"lint": "next lint"
},
"dependencies": {
- "@icons-pack/react-simple-icons": "^5.3.0",
+ "@icons-pack/react-simple-icons": "^7.1.1",
"@types/node": "18.14.6",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"eslint": "8.35.0",
"eslint-config-next": "13.2.3",
- "next": "13.2.3",
+ "next": "^13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"sharp": "^0.31.3",
"typescript": "4.9.5"
},
"devDependencies": {
- "autoprefixer": "^10.4.13",
+ "autoprefixer": "^10.4.14",
"postcss": "^8.4.21",
- "tailwindcss": "^3.2.7"
+ "tailwindcss": "^3.3.1"
}
}
from react-simple-icons.
This has been resolved in version v8.0.1. I have had the opportunity to submit this refactoring. Please, feel free to report if you encounter any issues.
from react-simple-icons.
I have now downgraded to v4.7.2 and tree shaking works properly. I'm guessing something is not configured correctly in the new Rollup config in this commit 362600c
from react-simple-icons.
Fixed in v5.3.0
from react-simple-icons.
Awesome, thanks for making a release!
from react-simple-icons.
This issue seems to be back since v.6.0.0
from react-simple-icons.
It is :/
from react-simple-icons.
@sch-28 Can you show the results with the latest version?
from react-simple-icons.
Edit: Downgrading to 5.11 fixes the issue.
Thanks, I just downgraded to 5.30 and it works for me.
from react-simple-icons.
If I have suffered my own mistake, working on it.
from react-simple-icons.
@aflatter @skyclo I am checking with version v7.1.1 I have a tree correctly
import {
SiReact,
Si1001tracklists,
SiAbbott,
Si1password,
} from "@icons-pack/react-simple-icons";
function IconsPage() {
return (
<div>
<SiReact color="#61DAFB" size={24} />
<Si1001tracklists color="#61DAFB" size={24} />
<SiAbbott color="#61DAFB" size={24} />
<Si1password color="#61DAFB" size={24} />
</div>
);
}
export default IconsPage;
from react-simple-icons.
Just tried 7.1.1, same problem:
Let me replicate your settings, I'll do some deeper tests
from react-simple-icons.
We are also facing the same problem:
https://github.com/LAION-AI/Open-Assistant/tree/main/website
"@icons-pack/react-simple-icons": "^7.2.0"
from react-simple-icons.
Related Issues (20)
- Dynamic import by icon slug HOT 2
- Version 5.1 Husky error HOT 3
- Typescript: Unable to add className prop HOT 2
- Use Dependabot to keep simple-icons up to date HOT 6
- Move to esbuild HOT 1
- Default Icon Color HOT 3
- v6.2.0 to v6.3.0 breaks all icon references HOT 3
- Icons in `any` instead of `IconType` HOT 2
- [RFC] Adding a default classname to all icons HOT 4
- Feature Request: Add Export for Default Icon Colors HOT 2
- Export `IconType` to allow use outside of the package
- "SyntaxError: ambiguous indirect export" when importing any icons or colors HOT 1
- Update Simple Icons Version HOT 1
- Is there a way to get icon component by specific enum name? HOT 4
- Error: EMFILE: too many open files HOT 6
- onPointerEnterCapture Errors HOT 5
- `missing the following properties` HOT 2
- Support React 19 HOT 1
- `9.7.0` introduce a BREAKING CHANGE HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-simple-icons.