-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with esNext Syntax in marked.js Bundle #3169
Comments
Option 1 is already available for your project. You can use Babel to compile marked to whatever version of es you need. We decided to drop support a while ago for es5 since the es5 version of marked was about 30% slower than esNext. It is unreasonable to believe marked knows what is best for all of its users. If you want speed you can use the esNext version. If you need wider support you can compile it with Babel. |
In summary, I think it's crucial for an open-source library to handle compatibility issues well, or it can bring endless problems to developers. |
No, I encourage you to test it yourself. If you find a way to speed up marked, we are always accepting PRs 😁👍
I think you are confusing open-source software with software that developers get paid to maintain. Unfortunately all of the maintainers of marked help in our free time. As such we do not have time to handle compatibility issues well. Hence passing off the work of compiling to the users. If you know of a better way to do it we are always accepting PRs 😁👍 |
Understood. I might initiate a pull request. |
Can you describe a bit more how to implement this solution? |
@jjblumenfeld you can use babel to transpile the code you send to your users if you need to support older browsers. You may need to tell it to transpile node_modules modules depending on your settings. |
What pain point are you perceiving?.
Describe the solution you'd like
Sure, I think option one can be a one-time solution, but it may lead to an increase in package size. Option two might be a bit more complicated as it requires replacing each one individually, and it's essential to ensure that subsequent code doesn't introduce similar syntax.
The text was updated successfully, but these errors were encountered: