Comments (5)
Yeah, I'm using react-syntax-highlighter and I'm able to require only the languages that I need, I think it makes sense since there are a lot of language files that will never be used.
from react-code-blocks.
Hey @jacobedawson, that's an interesting point you bring up. Currently, the languages are called using the PrismAsyncLight
component offered by react-syntax-highlighter
which should optimize the build size.
But the availability of languages might be a reason for the large package size.
Perhaps we can split the packages into a light version that would require the language to be a peer dependency?
I'm open to suggestions here
from react-code-blocks.
I second the request for a 'light' version with a way to select only the languages needed. I wanted a quick option for some JS highlighting and while the display looks great, my chunked build went from 10 files to 310.
from react-code-blocks.
Just wanted to bump this issue. 💯 would be great to have a light build option.
from react-code-blocks.
The prod build creates hundreds of react-syntax-highlighter_languages*.chunk.js
files even though it's only using the React highlighter.
from react-code-blocks.
Related Issues (20)
- CopyBlock warnings HOT 4
- Property "text" does not exist in type HOT 8
- Atlaskit theme
- Cannot run on react 17 + typescript HOT 7
- Export supported languages as a type
- Bug in highlight for some cases of ranges of one-digit to double-digit
- CopyBlock: Errors in the Console because of copied/codeBlock HOT 2
- Npm page is not updated HOT 7
- The wrapLongLines function isn't formatting properly.
- Support for React 18 HOT 1
- Bug: line highlighting doesn't work without line numbers
- Edit Feature?
- Copy Buttons do not have an accessible name
- Support for CSS Language HOT 1
- Language xml not supported HOT 2
- Is it possible to make the links clickable HOT 1
- Uncaught runtime errors: Cannot read property 'useContext' of null HOT 1
- Update some packages used HOT 2
- Can no longer create custom themes HOT 5
- Issue upgrading to 0.1.3 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-code-blocks.