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

Compatability with Vite 4.3.x? #110

Closed
jafin opened this issue Apr 22, 2023 · 4 comments
Closed

Compatability with Vite 4.3.x? #110

jafin opened this issue Apr 22, 2023 · 4 comments
Labels
upstream bug Bug caused by a dependency wontfix This will not be worked on

Comments

@jafin
Copy link

jafin commented Apr 22, 2023

I have a project that was running Vite 4.2.2, upgraded to Vite@4.3.1
Now when I run it appears the tsconfig aliases no longer work.

"vite-tsconfig-paths": "^4.2.0",
"@vitejs/plugin-react": "4.0.0",
"vite": "^4.3.1",
Error: The following dependencies are imported but could not be resolved:

  @pages/profile/profile (imported by D:/Data/_Code/src/Routes.tsx)
  @components/gallery/gallery ...

If I revert to Vite 4.2.2 it all works again.

my tsconfig.paths.json looks like this

{
  "compilerOptions": {
    "baseUrl": "./src",
    "paths": {
      "@components/*": ["components/*"],
      "@pages/*": ["pages/*"]
    }
  }
}

TBH Not sure if this is related to this plugin or vite 4.3x in general...

@aleclarson
Copy link
Owner

It's a vite bug. There was a huge refactor of the module resolution logic in 4.3

@aleclarson aleclarson added the upstream bug Bug caused by a dependency label Apr 23, 2023
@fwouts
Copy link
Contributor

fwouts commented May 14, 2023

@aleclarson is there a corresponding issue in the Vite repo already? If not how can we help?

Edit: from debugging, it looks like the issue is that resolveId() is called with a value for importer that isn't a fully resolved ID anymore, breaking the Rollup plugin API contract?

@Lilja
Copy link

Lilja commented Oct 19, 2023

Has the bug been solved now? There's a reference to this thread in the vite repo with a PR that's merged. But I'm still having the same issue.

@rtmann
Copy link

rtmann commented Oct 25, 2023

Lots of finger pointing here, no real path to resolution. We reverted to 4.2.2 and our CIDC pipeline works now. Weird though that 4.5.0 works fine locally, but not in the cidc. This plugin only fails in our cidc pipeline, same OS, same Node, Same yarn version, same environment variables, it fails on cidc in azure, but locally on windows in the same setup it works...

But if we revert to 4.2.2 it works in azure on our build agent.

Weird. I can't explain why it works locally, but not in the build agent...

@aleclarson aleclarson added the wontfix This will not be worked on label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream bug Bug caused by a dependency wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants