Skip to content

v4-beta : use env variable with config as a function  #1689

@xylolink

Description

@xylolink

Describe the bug

We need to manipulate env vars in the config file to adjust the compilation entries points

What is the current behavior?
Cli does not recognize --env.MYVAR parameter
Config returning this kind of result is not considered by CLI without any error message :
module.exports = (env) => { return { // my conf }

To Reproduce

encapsulate your config object in a function and try to compile it.

Expected behavior

CLI should receive config functions and --env parameters

Screenshots

Compilation results without function
image

Compilation result with function
image

Unknown --env params
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions