react-workspaces / react-workspaces-playground

⚛️ 🐈 Zero Config Create-React-App Monorepos with Yarn Workspaces, Lerna and React Storybook.
https://react-workspaces.github.io/react-workspaces-playground/
764 stars 128 forks source link

how can i use baseUrl in components #48

Open yanghoxom opened 4 years ago

yanghoxom commented 4 years ago

I have added jsconfig.json But it doesn't seem to work packages/components/jsconfig.json run with command: yarn start:app-ant-design @F1LT3R can you help me ?

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "modules/*": ["src/modules/*"],
      "graphql/*": ["src/graphql/*"]
    }
  }
}
F1LT3R commented 4 years ago

I thought jsconfig.json only worked in the root of your workspace. Is this wrong?

I'm not 100% sure how you're trying to use this. Can you add more context?

yanghoxom commented 4 years ago

@F1LT3R in packages/components I want to use baseUrl so I can use absolute path but when i put jsconfig.json to packages/components. it not work. always get message undefine xxx from import..

F1LT3R commented 4 years ago

Do you have other projects where jconfig.json works without it being in the root of the workspace?

yanghoxom commented 4 years ago

@F1LT3R no, jsconfig.json seem not work with this template