Git Product home page Git Product logo

Comments (7)

wooorm avatar wooorm commented on June 24, 2024

Can you check the issues, it's been discussed. It's impossible. Or: feel free to spend like a month on this if you really want it.

Also: I think svelte itself also is like: yeah, no, not going to happen.

from import-meta-resolve.

francisu avatar francisu commented on June 24, 2024

I have made it work with the above code, so it's not impossible. It you can change the resolver to add those few lines of code to detect pnp, then it will work fine. I'm happy to help here.

Old comments about yarn pnp not working with svelte are no longer true, as bugs have been fixed.

from import-meta-resolve.

wooorm avatar wooorm commented on June 24, 2024

This pkg is a ton of code, it’s a copy of the actual node internals. Just using require isn’t going to work on ESM files for this project. If that’s all your use case, then that’s fine for you?

I meant Rich’s comments on not being interested in supporting PnP

from import-meta-resolve.

wooorm avatar wooorm commented on June 24, 2024

Please see #23 (comment) and the above and related threads, which include the yarn maintainer

from import-meta-resolve.

francisu avatar francisu commented on June 24, 2024

This pkg is a ton of code, it’s a copy of the actual node internals. Just using require isn’t going to work on ESM files for this project. If that’s all your use case, then that’s fine for you?

This package will only be loaded in the PnP case, so it won't penalize anyone else.

I have not investigated how to do the fix with the ESM portions of your code, as I don't require that, but I'm sure something similar can be done in your code to handle this. If necessary we can get help from the yarn folks like @arcanis who have been very active in helping with exactly these situation. I'm willing to help too.

As I said before, I have resolved my problem by patching Prettier and bypassing the call to this package, but I'm trying to advocate for a broader fix which will help more people.

I meant Rich’s comments on not being interested in supporting PnP

Yes, I have seen this. I find it not very useful or helpful. Svelte does not need to do anything directly to support PnP, the issues are with underlying packages (like this one). His comment is also quite old. yarn pnp is very actively developed and constantly improving.

from import-meta-resolve.

wooorm avatar wooorm commented on June 24, 2024

Ok well #23 (comment) still stands. I think it’s going to take several weeks for someone to implement. It would be a fork of this project or a completely different project. If someone wants to make that, we can talk again after that.
It basically means copy/pasting a lot of Node into a project. At that point, using Node itself seems simpler to me.

from import-meta-resolve.

francisu avatar francisu commented on June 24, 2024

See PR #28

from import-meta-resolve.

Related Issues (18)

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.