Giter VIP home page Giter VIP logo

Comments (2)

joeldenning avatar joeldenning commented on May 30, 2024

Hi @HemTech, good question. The import maps spec strictly forbids this behavior (docs):

As another consequence of how import maps affect all imports, attempting to add a new <script type="importmap"> after any module graph fetching has started is an error. The import map will be ignored, and the <script> element will fire an error event.

Contrary to the spec, SystemJS provides a few APIs that support modifying the module registry without reloading the page. Specifically, System.delete plus a subsequent System.import() will cause the module to be downloaded again.

Additionally, in the last several days, SystemJS has considered deviating from the spec to allow for direct import map updates. See systemjs/systemjs#2215, systemjs/systemjs#2211, and https://github.com/guybedford/import-maps-extensions.

I'm open to this feature being added to import-map-overrides, but there are a few edge cases that might become tricky, as this is essentially hot reloading of modules. One question for you - are you using import-map-overrides for local development purposes, or for managing deployments? I would strongly discourage using it as a deployment mechanism.

from import-map-overrides.

robmosca avatar robmosca commented on May 30, 2024

This issue seems to be stale. With the current vision about moving towards ESM, I believe we can close it, for the time being. @HemTech, please, feel free to add comments in case you want it to be reopened.

from import-map-overrides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.