-
Notifications
You must be signed in to change notification settings - Fork 65
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
import as a ES2015 module #46
Comments
You can just do e.g.,
|
This is becoming more brittle in some environments:
|
@cco3 It looks like the best approach to maintain both the old and the new import styles is to create a new directory with files that use the new style and add a statement to the package.json file. Does that sound like the right approach? |
Yes, basically just use new-style imports and run it through something like vite or rollup to create outputs in a dist directory which are referenced in package.json. |
Thanks for developing this wonderful library. Just a quick question. How to import this library as a ES2015 module?
var bcv_parser = require("bible-passage-reference-parser/js/en_bcv_parser").bcv_parser;
I'd like to use ES2015's
import
instead of CommonJS'srequire
.The text was updated successfully, but these errors were encountered: