Comments (2)
This is a severe build bug in the @primer/styled-octicons
package.
In short, each icon contains the whole library, even if unused.
This is /dist/icons/AccessibilityIcon.js
:
You're importing from the index, which internally looks like:
export {AccessibilityIcon.js} from './dist/AccessibilityIcon.js'
// etc repeated N times
So yes, that's why the weight is N*N 😅
from octicons.
For those using Next.js, the following helps mitigate the issue:
const nextConfig = {
experimental: {
optimizePackageImports: [
'@primer/octicons-react',
'@primer/styled-octicons'
],
},
};
from octicons.
Related Issues (20)
- [Bug] @primer/octicons-react `esm` is incorrectly exported
- [Bug] Esm requires file extension in d.ts files. HOT 2
- [Feedback]
- was the folder symlink icon removed for a reason? HOT 6
- [Bug] `@primer/octicons-react` v19.0.0 not published HOT 2
- [Feedback] No empty/unchecked checkbox to go with "checkbox" icon? HOT 2
- [Feedback] Repo Icons are inconsistent HOT 2
- [Feedback] HOT 1
- [Bug] Discrepancies Between Figma Octicons Set and React Library HOT 3
- Biling code
- Titel
- [Bug] HOT 1
- [Bug] Missing icons accessibility and accessibility-inset in 24px HOT 1
- [Feedback] Duplicated icons HOT 2
- [Feedback] Publish icon list as part of the build process HOT 1
- [Suggestion] Add `git-branch-deleted` and `tag-deleted` icons HOT 3
- [Bug] The SVGs in /build/svg/ don't have the `octicon` classes attached HOT 2
- [Bug] `@primer/octicons-react` includes raw SVG files, but are inaccessible HOT 1
- [Bug] `@primer/octicons` includes all the raw SVGs twice HOT 1
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 octicons.