Skip to content

建议:把环境变量传入webpack配置 #54

@jsspace

Description

@jsspace

这个地方能不能把环境变量传进来,这个可以根据环境来设置不同的插件配置。

可以判断webpack是否是函数,如果是函数,执行之后再赋值

if (customConf.webpack) {
  if (typeof customConf.webpack === 'function') {
    customConf = customConf.webpack(defaultsOptions.nodeConf)
  } else {
    customConf = customConf.webpack
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions