Comments (5)
Hey there, @meismann-as! I'm really glad to hear you are enjoying it. 😄
It sounds like there might be an issue with your bundler configuration. Most of the modules and dependencies of ink-mde
are already split into individual smaller chunks that only get included in your project when used. As for the language dependencies, those are included for highlighting various languages inside of Markdown code blocks. If you have a link to your project or another example, I'd be happy to take a look at it to see if there's something I can do.
from ink-mde.
Hi, thank you for replying so quickly and offering help! Hm, big chunks seem to be an issue of my yarn
configuration, that makes sense. I will go and check back there (our client's private repo, so I am sorry not to be able to provide insight). However, we will not support language highlighting in Markdown code blocks; in fact, we expect the user not to write any code there at all apart from Markdown. From your reply I take it that limiting the language highlighting support to a subset of languages to reduce dependencies is not a feature so far, is that right? If so, could it be a future feature?
from ink-mde.
Not a problem at all! I think it makes sense for code blocks to be configurable. As for individual languages, I think I'd need to see what kind of bundler configuration would make that necessary since those are already individual chunks.
from ink-mde.
I was wrong in my assumption that the language highlighting deps would get bundled into the index.js and imported by default. Instead, e.g. the Ruby chunk gets loaded only when I try to write Ruby in the editor. Very neat!
The chunk over 500kB, that yarn build
warned my about, is index.js. This is because after including Ink-MDE in the bundle, index.js grows from previously 252kB to 789kB. I think we will have to make do with that. Thank you for your efforts!
from ink-mde.
This is because after including Ink-MDE in the bundle, index.js grows from previously 252kB to 789kB.
@meismann-as that definitely makes sense. I am still working to reduce the overall bundle size of the main import, but a big part of that is CodeMirror itself. If you don't want your main entry to be that large, you could either dynamically initialize ink-mde
(e.g. const { ink } = await import('ink-mde')
, or you could create a separate chunk manually.
from ink-mde.
Related Issues (20)
- svelte wrapper HOT 8
- Is there a way to use CodeMirror's `placeholder` extension? HOT 3
- Support smart punctuation HOT 5
- Inline syntax highlighting is broken in the latest version(s) HOT 9
- Multi-line formatting does not work properly HOT 1
- custom/external formatting toolbar? HOT 3
- Automatically load external `katex` CSS
- List indentation with tabs
- cant install ink-mde when using svelte 4 HOT 5
- Missing Keymap support HOT 1
- How Do I get an instance object of codemirror from AwaitableInstance HOT 1
- Option to hide markdown syntax for links, headers, bold, and italic blocks
- Bottom border for headers
- Input lag on Safari
- [Feature Request] Full screen mode
- Editor broken when used with Shadow DOM
- Ability to Get Codemirror Instance
- Bug: Toolbar Actions Don't Work Expectedly When No Selection HOT 1
- Having trouble starting a minimal example.
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 ink-mde.