Code completion / JS file / Same Lib / One CDN link works, other not

Why does the 1st line work with code completion, while the 2nd line (even after downloading the library) doesn't work?

import * as vg from 'https://cdn.jsdelivr.net/npm/@uwdata/vgplot@0.3.4/dist/vgplot.js';
import * as vg from 'https://cdn.jsdelivr.net/npm/@uwdata/vgplot@0.3.4/+esm';
 

1

The IDE expects the URL to  end with either .js or .mjs extension; note also that the code in the latter link is minified, completion doesn't work reliably when using minified library files.

0

It would be great to see the support for URLs like these in import statements:

1) https://cdn.jsdelivr.net/npm/@uwdata/vgplot@0.3.4/+esm
2) https://cdn.jsdelivr.net/npm/uuid/dist/esm-browser/index.js/+esm

> completion doesn't work reliably when using minified library files

Doesn't it help that these minified files have source maps?

0

Doesn't it help that these minified files have source maps?

No, source maps are only used for debugging, they aren't used for completion

1

请先登录再写评论。