Skip to content

[Feature Request] Workspaces compatibility to allow shared config #1815

Closed
@AlexandreBonaventure

Description

@AlexandreBonaventure

What problem does this feature solve?

Hi,
[email protected] brings a very interesting and exciting hope to shared config between projects.

A little bit of context:
At our company we were using vue webpack template to power multiple apps that basically shared more or less the same build config. It was obviously very tedious to upgrade a config across the board at the time. We moved progressively these apps to the new vue-cli, it is now much easier to upgrade the config, but even then we would like to push it further by implementing a shared config for all projects.
Naively I thought: what about creating a submodule with a common vue.config.js (overidable in each project with a smart script) and additionally leverage yarn workspaces. BIM BAM BOUM, we could have full control of all projects in just one place!! Wouldn't it be great ?

PROBLEM:
Vue-cli service is not designed to be used with workspaces (at least I don't think so). The issue sits in the way the service is resolving plugins:

resolvePlugins (inlinePlugins, useBuiltIn) {

The script runs in the right context (aka root project folder) but it resolve packages against the root package.json which does not contain any plugins (because they are in a subfolder).

What does the proposed API look like?

One solution I can see is to be able to configure the path of the package.json from the CLI (with a flag).

I am sure this can benefit to others, so this issue can be a discussion. Any insights for achieving this ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions