Is it possible to use subresource integrity with ES6 module imports?

后端 未结 4 1824
广开言路
广开言路 2020-12-06 00:37

Given code like this:

import { el, mount } from \'https://unpkg.com/redom@3.2.1/dist/redom.es.js\';

is there some way to enable subresource

4条回答
  •  暖寄归人
    2020-12-06 01:01

    With Deno supporting such imports for its dependencies (and having no out-of-the-box package manager) and Node leaving open the chance for importing non-file URLS in the future, this issue becomes even more important.

    While what @fregante mentions about there not being yet a proposal remains accurate, https://github.com/WICG/import-maps/issues/174 includes discussion, including via a referenced slide presentation, of some of the questions raised in modifying the syntax (e.g., transitive dependency cache invalidation) to support SRI as well as other possible alternatives.

提交回复
热议问题