Skip to content

ES6 modules not found when loaded over network #29854

Closed
@hindsholm

Description

@hindsholm

Issue Type: Bug

ES6 modules can be loaded over HTTP(S) like this:

import { LitElement, html } from 'https://dev.jspm.io/[email protected]/lit-element.js';

This works fine in any modern browser since it is standard ES6 and I find it very convenient for small projects because it allows you to completely avoid the complexity involved with npm and packagers.

However, VS Code complains with a red underline and the mouseover error message:

Cannot find module 'https://dev.jspm.io/[email protected]/lit-element.js'. ts(2307)

It would be great if VS Code did not complain about this (since it is possible to find the module) and even better of course, if the module could be resolved correctly like locally-loaded modules.

VS Code version: Code 1.31.0 (7c66f58312b48ed8ca4e387ebd9ffe9605332caa, 2019-02-06T08:51:24.856Z)
OS version: Linux x64 4.20.6-arch1-1-ARCH

System Info
Item Value
CPUs Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz (4 x 3084)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
surface_synchronization: enabled_on
video_decode: unavailable_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 11.60GB (0.27GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (20)
Extension Author (truncated) Version
swagger-viewer Arj 2.2.0
rest-client hum 0.21.1
plantuml jeb 2.10.3
Kotlin mat 1.7.0
rainbow-csv mec 1.0.0
python ms- 2019.1.0
openhab ope 0.4.1
vscode-template-literal-editor pli 0.9.0
java red 0.38.0
vscode-xml red 0.3.0
LiveServer rit 5.4.0
es6-string-html Tob 1.8.6
vscodeintellicode Vis 1.1.3
vscode-apielements vnc 0.6.7
vscode-java-debug vsc 0.16.0
vscode-java-dependency vsc 0.3.0
vscode-java-pack vsc 0.5.0
vscode-java-test vsc 0.14.0
vscode-maven vsc 0.14.2
vscode-wakatime Wak 1.2.5

(1 theme extensions excluded)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions