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
Can this library be used in ES without webpack? #72
Comments
There is in node-figlet (https://github.com/patorjk/figlet.js/blob/master/lib/node-figlet.js). That's what package.json points to (for the "main" prop). Also, at the bottom of the figlet file, there is an export statement. What kind of changes are you thinking of? What would be the use case? I'm all for updating the package if it makes it easier for something, as long as it maintains its backward compatibility. |
@patorjk close, but it's an exports statement, as opposed to export. The story is like this, when nodejs was born, the browsers did not have a module system yet. And suddenly npm created a big ecosystem that potentially could benefit the web dev 10 years ago. However, at the time, in order for browsers to use a 3rd party library, the library has to inject itself into the The good part of webpack is help to bundle a web app, but the evil part webpack is to hinder the incentive of migrating the old node package system to ES module system, like yours. So that's why you could see lodash and lodash-es co-exist. Good thing is node has started to support ES syntax so that's the start of the death of the require syntax. So I think it may make sense to create a new file called figlet-es.js which will be usable in modern browsers natively. |
I don't see any export keyword in the figlet.js. I wonder if you can make a change so we can use it in native ES code? Thanks.
The text was updated successfully, but these errors were encountered: