ESM incompatibility due to round-to (direct dependency)
See original GitHub issueFirst of all thank you for providing and esm export but unfortunately it’s not working as expected because round-to (a direct dependency) isn’t an esm module itself.
Error:
SyntaxError: Importing binding name 'default' cannot be resolved by star export entries.
or
import capsize from 'https://unpkg.com/capsize';
const styles = capsize({
capHeight: 16,
lineGap: 8,
fontMetrics: {
capHeight: 700,
ascent: 1058,
descent: -291,
lineGap: 0,
unitsPerEm: 1000,
},
});
console.log("styles: ", styles);
See reproduction here (round-to): https://esm.codes/#aW1wb3J0IHJvdW5kVG8gZnJvbSAnaHR0cHM6Ly91bnBrZy5jb20vcm91bmQtdG8nOwoKY29uc29sZS5sb2coInJvdW5kOiAiLCByb3VuZFRvKDEuMjM0LCAyKSk7
or
import roundTo from 'https://unpkg.com/round-to';
console.log("round: ", roundTo(1.234, 2));
Be careful not to use a cdn like cdn.skypack.dev
it will look like it’s working because they magically translate non esm module into esm module on the fly, see here:
or
import roundTo from 'https://cdn.skypack.dev/round-to';
console.log("round: ", roundTo(1.234, 2));
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Issues · seek-oss/capsize - GitHub
ESM incompatibility due to round-to (direct dependency). #30 opened on Jan 24, 2021 by sync · 6. ProTip! Adding no:label will show everything...
Read more >Anthony Mittaz on Twitter: "@michaeltaranto But could be even ...
First of all thank you for providing and esm export but unfortunately it's not working as expected because round-to (a direct dependency) isn't...
Read more >751 PART 15—RADIO FREQUENCY DEVICES - GovInfo
the-air due to radiation of the radio frequency signals from the electric power lines (intentional radiator). (g) CB receiver. Any receiver that op-....
Read more >DoDM 4145.26, March 13, 2008, Incorporating Change 2 ...
(a) DoD Directive 6055.09E, “Explosives Safety Management (ESM),” ... The contracting officer may direct a different time period for the.
Read more >IBM CICS Transaction Server for z/OS, V5.6 delivers ...
This can be linked to from COBOL or any other language using the CICS ... components in addition to the external security manager...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Resolved by #33
Will be removing the dependency in favour of internalising the function as part of an upcoming PR.