Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import-analysis: external ids should not be prefixed with /@id/ #8827

Closed
7 tasks done
Aslemammad opened this issue Jun 28, 2022 · 2 comments
Closed
7 tasks done

import-analysis: external ids should not be prefixed with /@id/ #8827

Aslemammad opened this issue Jun 28, 2022 · 2 comments

Comments

@Aslemammad
Copy link
Contributor

Aslemammad commented Jun 28, 2022

Describe the bug

I've been working on vite-plugin-jspm and I was trying to control the dependencies using export maps and JSPM!
And what I wanted to achieve is that I wanted plain externalized IDs (dependency) like { id: 'react-dom', external: true }! and not something that Vite handles (with external, we get some control, but Vite still injects /@id/ to the externalized id) here.

Expected behaviour

As far as I think, we've got two expected behaviours:

  • adding an option along external, that let vite know that a specific id should not be prefixed with /@id/
  • Or not prefixing the ids that have external as true!

I prefer the second one though I'm not sure if that has to do with external

Example

Since es-module-shims cannot figure out what /@id/react is, we get this error:

GET http://localhost:3000/@id/react net::ERR_ABORTED 404 (Not Found)

Reproduction

Nothing to reproduce!

System Info

System:
    OS: Linux 5.18 Artix Linux
    CPU: (4) x64 Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
    Memory: 1.98 GB / 7.66 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.1/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
  Browsers:
    Brave Browser: 102.1.39.122

Used Package Manager

pnpm

Logs

No response

Validations

@bluwy
Copy link
Member

bluwy commented Jul 5, 2022

I think this is a duplciate of #6582. I'm working on the feature on the side, but trying to get it polished up soon.

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2022
@Aslemammad
Copy link
Contributor Author

Sure, I'm excited about it since it opens many possibilities! Thank you for the great work, Bjorn!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants