Giter Club home page Giter Club logo

Comments (3)

squaremo avatar squaremo commented on June 6, 2024

And it's not valid considering v8 will not resolve the same module specifier twice

Would you elaborate on why it's not valid?

There are certainly related problems introduced by how V8Worker2's LoadModule is implemented: specifically, it requires that the resolver callback calls LoadModule with the specifier exactly as given (otherwise it will regard it as not having loaded, afterward); but, it doesn't canonicalise them, meaning that has to be done in the resolver (otherwise the same module, referred to by different paths, will be re-initialised).

from jk.

dlespiau avatar dlespiau commented on June 6, 2024

There are two things intermixed in that comment:

  • should import * from 'foo'; work when we mean import * from './foo'
  • v8worker2 seems to be caching specifiers that have already been resolved, if I have two files in two different directories both doing import * from './foo, the way I read the code/comment is that the second ./foo will not try to be resolved and we'll use the first foo.js for the second file. Easier way is to test it I guess.

from jk.

dlespiau avatar dlespiau commented on June 6, 2024

We now have a good grasp on this and @squaremo just fixed the relative import with identical specifiers issue. Let's close it! More precise issues should be opened when needed.

from jk.

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.