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 for vetur.config.js #42

Open
Tornquist opened this issue Aug 24, 2021 · 2 comments
Open

Support for vetur.config.js #42

Tornquist opened this issue Aug 24, 2021 · 2 comments
Labels
enhancement New feature or request vetur Something related to Vetur

Comments

@Tornquist
Copy link

I was wondering if there are any plans for supporting vetur.config.js?

It's critical for monorepo support with tsconfig.json living in a subfolder. https://vuejs.github.io/vetur/reference/

I'm interested in support of:

module.exports = {
  settings: {
    "vetur.useWorkspaceDependencies": true,
    "vetur.experimental.templateInterpolationService": true
  },
  projects: [
    {
      root: './client',
      package: './package.json',
      tsconfig: './tsconfig.json',
    }
  ]
}

We've recently reorganized our repository and path loading is no longer working properly with this plugin.

@tommasongr
Copy link
Owner

Hi there!

I'm not really sure if this is something I will be able to implement. This extension is using only a subset of the Vetur project. The only piece integrated is the Vue Language Server (VLS). If this config file is implemented at a higher scope than VLS there is not much I can do.

Anyway these two configs are already exposed in the extension settings

settings: {
    "vetur.useWorkspaceDependencies": true,
    "vetur.experimental.templateInterpolationService": true
},

CleanShot 2021-08-25 at 10 19 44@2x

For the project part I'm not sure. It seems something not related with VLS...

If I'll have some spare time I'll investigate on this on the weekend 😉

@tommasongr tommasongr added enhancement New feature or request vetur Something related to Vetur labels Aug 25, 2021
@Tornquist
Copy link
Author

It looks like vetur is using the config directly and then is passing it to VLS.

https://github.com/vuejs/vetur/blob/e869345391ad404c3f6d3dc9da0ef73da23fe6c5/server/src/config.ts#L192

export async function getVeturFullConfig(
  rootPathForConfig: string,
  workspacePath: string,
  veturConfig: VeturConfig
): Promise<VeturFullConfig> {
  const oldProjects = veturConfig.projects ?? [workspacePath];
  const projects = oldProjects.map((...
...

If there were a way to override the workspace path, that alone would be a huge win for me. That doesn't add monorepo support for multiple vue projects, but would allow me to continue using nova from one directory above the actual vue project for a single vue app.

Unfortunately, I have zero knowledge of how these pieces all connect, so I'm not much help here.

Any time or interest you have in looking into this is very appreciated. Thank you for all of the work already done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vetur Something related to Vetur
Projects
None yet
Development

No branches or pull requests

2 participants