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
[ES Modules] Missing js extensions in import statements #4713
Comments
Adding the A more appropriate result might be achieved by adding "esnext": "src/moment.js",
"module": "./moment.esm.js", (where |
+1 for a new esm build target. For reference, Ractive.js provides an .mjs dist file |
I'll take a PR on documentation about this in https://github.com/moment/momentjs.com |
Btw, even with a good number of HTTP requests, it can be convenient to have browser builds for use in demos--where the demos aren't forced to pollute their HTML with global script dependencies (I know it'd just be one script tag if there is an IIFE or UMD build, but a script tag is still out of place from the JS that uses it and cleaner to have a module distribution). |
@brettz9 I'll look at PRs that don't break any existing users. |
How could this break users? I can't think of any platform that doesn't support using the .js extension on imports. Even typescript supports it. Regards |
Description of the Issue and Steps to Reproduce:
When loading
src/moment.js
with<script type=module>
:Environment:
Any browser with support for ES modules.
The text was updated successfully, but these errors were encountered: