WICG / virtual-scroller

Other
2k stars 83 forks source link

Consistently use .mjs to denote modules #112

Closed mathiasbynens closed 6 years ago

mathiasbynens commented 6 years ago

Module scripts behave differently than classic scripts. As such, I'd like to suggest explicitly denoting the difference by using the .mjs extension for modules and .js for classic scripts.

More details on this guidance: https://developers.google.com/web/fundamentals/primers/modules#mjs

Similar changes have landed upstream in the Layered APIs repository. It would be nice to be consistent with that.

mathiasbynens commented 6 years ago

I've updated the commit message and the description, and have also rebased the patch. Please take another look. Thanks!

valdrinkoshi commented 6 years ago

@mathiasbynens sorry I had to revert this as it breaks the npm run format and requires the server to handle .mjs MIME types - hence we should update the README.md. Mind re-opening this PR with the fixes?

mathiasbynens commented 6 years ago

Done: #126

I’ve added a separate commit that changes package*.json and the README.