-
-
Notifications
You must be signed in to change notification settings - Fork 26
Dynamically adding languages at runtime #36
Comments
Totally open to this 👍 |
I have this implemented in emberclear: what are thoughts on this approach? With that approach, we could get rid of the config options as well (aside from maybe theme?) |
@NullVoxPopuli I think we should try to keep the config static, and keep the things you don't want out of |
what's the advantage of keeping additional files out of dist? |
Just to not have extra stuff in it. I suppose it's no big deal, but just don't like putting unnecessary things in the bundle. |
I'm trying to do this in emberclear.io, without ember-prism, but it's been tricky enough where I think once I figure it out, it should be pulled in to here.
The reasoning behind being able to dynamically load languages at runtime is to cut down on bundle size. Right now, the ember-prism config is static.
Prism is large, (esp when compared to the total size of small apps). So, being able to omit everything Prism for the initial load is greatly desireable, and then once code renders that needs prism, it could fetch the deps.
Also, for editor purposes (imagine slack's code snippet modal), having the list of languages selectable, but not always loaded would benefit load/parse performance as well.
The text was updated successfully, but these errors were encountered: