Closed cloudily closed 5 years ago
Hi, thank you for this PR
Before accepting it I need some more context. Why do you need this?
How does polymer-cli
know about the newly created artifact? It is not listed in package.json
.
It is this following some kind of naming convention?
Thanks
Hi @pladaria,
The mjs
extension has not been formalized yet. It is currently recognized by node, but not by some build tools. For example, the polymer-cli throws an error with the unrecognized mjs extension. This is to provide build tools a way to interpret these files as they relate to ES imports. Please let me know if you have any further questions.
When importing into the frontend, we use the following syntax:
import ReconnectingWebSocket from 'reconnecting-websocket/dist/reconnecting-websocket.mjs';
This currently fails build tools because of the mjs
extension, hence the addition. I didn't want to change it for everyone, as it would be a breaking change.
All clear! Thank you for your explanation
published 4.1.10 with that change
Thanks, @pladaria
Coverage remained the same at 94.309% when pulling 151b7456c35417c5602c7731cf4f163edfc96b2c on cloudily:feature-polyer_cli_support_for_mjs into f67d5c2ccedae5f23605286cf513525396c1eb18 on pladaria:master.