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

Usage in MonoRepo - Setting "project root" #11

Open
armenr opened this issue Jul 27, 2021 · 4 comments
Open

Usage in MonoRepo - Setting "project root" #11

armenr opened this issue Jul 27, 2021 · 4 comments

Comments

@armenr
Copy link

armenr commented Jul 27, 2021

Coming from Vetur + Quasar to Volar + Vite VSCode plugin + Vitesse and I absolutely love how much more stable (and less fussy) this setup is.

With Vetur, we were able to configure settings for where certain config files and directories were (relative to the project), specifically for monorepos.

I'm currently using a pretty standard monorepo + "workspace" setup --> so the Vite plugin in VSCode cannot correctly find my vite.config.ts file or correctly "read" that this is a Vite project (to get the benefit of automatically starting the server, using the embedded browser view, and debug tools...etc).

I've not been able to find source code or documentation for configuring this plugin to work if I have the following monorepo setup.

├── README.md
├── TODO.md
├── amplify
│   ├── #current-cloud-backend
│   │   ├── amplify-meta.json
│   │   ├── auth
│   │   ├── backend-config.json
│   │   └── tags.json
│   ├── backend
│   │   ├── amplify-meta.json
│   │   ├── auth
│   │   ├── backend-config.json
│   │   └── tags.json
│   ├── cli.json
│   └── team-provider-info.json
├── amplify.yml
├── cz.yaml
├── node_modules
├── package.json
├── packages
│   └── client
│       ├── LICENSE
│       ├── README.md
│       ├── android
│       ├── capacitor.config.json
│       ├── components.d.ts
│       ├── dist
│       ├── generateCapacitorConfig.js
│       ├── index.html
│       ├── ios
│       ├── locales
│       ├── node_modules
│       ├── package.json
│       ├── pnpm-lock.yaml
│       ├── public
│       ├── src
│       ├── tsconfig.json
│       ├── vite.config.ts
│       └── windi.config.ts
└── pnpm-workspace.yaml
@antfu
Copy link
Owner

antfu commented Jul 28, 2021

Sounds reasonable, pr welcome, thanks.

@armenr
Copy link
Author

armenr commented Jul 29, 2021

@antfu - can you point me in the direction of where to start from (in the code)? It might save me just a bit of time navigating the codebase on my own! :) I've never really worked on a VSCode extension before, but I'm happy to try

@antfu
Copy link
Owner

antfu commented Jul 30, 2021

Define config:

"vite.autoStart": {

Read config:
https://github.com/antfu/vscode-vite/blob/main/src/config.ts

@armenr
Copy link
Author

armenr commented Jul 30, 2021

@antfu - Got it! I will try to get a PR done this weekend :)

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

No branches or pull requests

2 participants