Skip to content

resolveClientEnv.js - Configure prefixRE  #2997

@monsdroid

Description

@monsdroid

What problem does this feature solve?

Using vue-cli on an exisiting project i would like to add additional prefixes which should be transfered to the client

In the Doc (https://cli.vuejs.org/guide/mode-and-env.html#using-env-variables-in-client-side-code) it states that only VUE_APP prefixed vars are getting replaced in the Client.

We have quite a view env.vars with a different prefix but our build system relies on that naming.
so please let me configure additional prefixes to keep in vue.config.js

What does the proposed API look like?

envPrefixeToKeepInClient: ['PREFIX1_', 'PREFIX2_', ....]

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