Include usage with <script> tag and CDN only
Is there an officially supported way of just using this library as a single (minified) JS file that you can include via a <script> tag and immediately start using without dealing with NPM or ES6 modules?
I managed to get it working via the "hack" below, but I have no idea if the approach is encouraged or prone to errors?
Non-NPM / non-module usage:
- Include this script: https://www.unpkg.com/chrono-node/dist/bundle.js
- Use the global variable
chronoin your script
E.g. chrono.parseDate('Tomorrow at 4 PM PST')
⚠ Note: I have not tested this extensively, so don't expect it to work flawlessly
ditto
Hello. It would take time for me to setup ENV to fix the build configuration.
In the meantime, would include the script and use chrono in the top-level window works?
https://www.unpkg.com/browse/[email protected]/dist/cjs/index.js