-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Resolve package paths instead of relative ones? #2044
Comments
These are package paths, not absolute paths. Absolute paths start with Since esbuild uses node's path resolution algorithm, these package paths cause esbuild to look inside the Here are some ways to get this to work:
|
Per the Node.js resolution algorithm there are two features that can help here:
|
This worked like a charm. Thanks! For future readers, I added a
|
Hi there, I thought I'd give Rails 7 + esbuild a spin and I'm running into a slight issue with path resolution. My team tends to re-use files across multiple projects and rewriting our absolute paths to relative ones over 100s of files would be cumbersome. Is there anyway to have esbuild use an absolute path?
Here are my files
When I import files like this, it works
But when I try to resolve with an absolute path, I get this error
Note: I've also tried with the same error
import { PrimaryButton } from 'app/javascript/shared/Buttons'
import { PrimaryButton } from 'javascript/shared/Buttons'
import { PrimaryButton } from 'shared/Buttons'
import { PrimaryButton } from './shared/Buttons'
Here is my config:
The text was updated successfully, but these errors were encountered: