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

Support tsconfig paths in order to avoid 'could not resolve` #60

Closed
abhishiv opened this issue Apr 15, 2020 · 4 comments
Closed

Support tsconfig paths in order to avoid 'could not resolve` #60

abhishiv opened this issue Apr 15, 2020 · 4 comments

Comments

@abhishiv
Copy link

abhishiv commented Apr 15, 2020

tsconfig

{
  "compilerOptions": {
    ...baseConfig,
    "paths": {
      "@oss-stealth/unikernel/*": ["./src/unikernel/*"],
      "@oss-stealth/rpc/*": ["./src/rpc/*"],
      "@oss-stealth/runtime/*": ["./src/runtime/*"],
      "@oss-stealth/ui/*": ["./src/ui/*"],
      "@oss-stealth/typescript/*": ["./src/typescript/*"],
      "@oss-stealth/fs/*": ["./src/fs/*"],
      "@oss-stealth/ts/*": ["./src/ts/*"],
      "@oss-stealth/leela/*": ["./src/leela/*"],
      "@oss-stealth/satya/*": ["./src/satya/*"],
      "@oss-stealth/microkernel/*": ["./src/microkernel/*"]
    }
  }
}

error

src/hub/src/pages/repo/components/repo_host.tsx:6:43: error: Could not resolve "@oss-stealth/rpc/src/index"
import { RPC, FrameHostRPCTransport } from "@oss-stealth/rpc/src/index";
@evanw
Copy link
Owner

evanw commented Apr 15, 2020

Thanks for the feature request! I would like to add support for this at some point.

Edit: It's worth mentioning that "baseUrl": "." works already, which solves some use cases for "paths". For example, the Rome project uses "paths" but I was able to get it to build with esbuild using just "baseUrl": "." instead.

@josteph
Copy link

josteph commented Jan 27, 2021

Will this work without specifying --bundle in the option?

@lednhatkhanh
Copy link

lednhatkhanh commented Feb 5, 2021

I couldn't make it to work without using the --bundle option, could you please help? Thank you.

@Shyam-Chen
Copy link

I found #394 might be the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants