GithubHelp home page GithubHelp logo

Comments (5)

nyaxt avatar nyaxt commented on July 19, 2024

I'll proceed with the implementation by requiring the path_prefix to be a valid absolute URL, but given the story is to improve the development time experience, I assume that we want to have some kind of relative URL support.
e.g.) prod URL at https://prod.example.com/app/foo.html, while developing on https://localhost:8000/foo.html

from import-maps.

domenic avatar domenic commented on July 19, 2024

We are working on an answer for how the page URL, package map URL, and module URL all related in #37. Let's be sure to include all these test cases :).

from import-maps.

domenic avatar domenic commented on July 19, 2024

@guybedford, @justinfagnani, is this kind of case covered by the tests yet? What kind of answers do we give?

from import-maps.

guybedford avatar guybedford commented on July 19, 2024

For a package map hosted at http://foo.com/lib/map.json and a site at http://example.com/baz/app.html, the base-level path_prefix is resolved to the URL of the package map giving http://foo.com/foo/.

All the cases described then resolve moment to http://foo.com/foo/moment/src/moment.js. That is, the root scope always applies regardless of referrer, while the child scopes themselves resolve relative to the package name map baseURL, to then compare against the referrer. (I did actually test this as well)

Note also that if the path_prefix were foo without the leading /, then the same would apply here but into http://foo.com/lib/foo.

from import-maps.

domenic avatar domenic commented on July 19, 2024

This issue probably still has some relation to the current proposal, but it's hard to extract. Maybe it is covered by #63. Let me close it and we can file a new one that relates to the import maps proposal.

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.