Skip to content

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

Description

@jsspace

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

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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