Git Product home page Git Product logo

Comments (4)

domenic avatar domenic commented on June 10, 2024

It's really up to the implementing browser? Like all speculative parsing, that's an optimization you can choose to perform, which may be wasted or may be useful.

Although in the case you list, I'm not sure what you mean by "preload the import map", since it is inline.

from import-maps.

allstarschh avatar allstarschh commented on June 10, 2024

Although in the case you list, I'm not sure what you mean by "preload the import map", since it is inline.

I am trying to preload the inline import map script tag as well, as the speculative parser will try to preload the module script tag.
If the parser didn't preload the import map tag, then the module script won't be able to resolve the specifier from the import map.

However, if the parser preloads the import map tag, but it won't know the dymanic import call from the javascript, and 'accepts' the import map tag instead.

I'd like to point out that with import map tag, preloading and non-preloading module scripts (for speculative parsing) could possibly have different bahaviors.

from import-maps.

domenic avatar domenic commented on June 10, 2024

Yep, that's what that section is about! Like <base> or <script>, <script type=importmap> can cause preloading and non-preloading URL resolution to differ.

from import-maps.

guybedford avatar guybedford commented on June 10, 2024

It probably still makes sense to incorporate import maps when available into the preloading, assuming they will apply, unless there is an obvious statically detectable violation like a module script before an import map tag.

from import-maps.

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.