roadhog env配置 production 无效

在.webpackrc.js 中env的生产环境与开发环境分别配置了引入antd样式的插件,在开发时,有效,build之后,antd样式丢失

"env": {
    "development": {
      "extraBabelPlugins": [
        "dva-hmr",
        ["import", { "libraryName": "antd", "style": true }]
      ]
    },
    "production": {
      enableSourcemaps: true,
      "extraBabelPlugins": [
        ["import", { "libraryName": "antd", "style": true }]
      ]
    }
  }

暂时解决思路,将其放置在外部即可

  "extraBabelPlugins": [
      ["import", { "libraryName": "antd", "style": true }]
    ],
  "env": {
    "development": {
      "extraBabelPlugins": [
        "dva-hmr",
        //["import", { "libraryName": "antd", "style": true }]
      ]
    },
    "production": {
      enableSourcemaps: true,
      "extraBabelPlugins": [
        //["import", { "libraryName": "antd", "style": true }]
      ]
    }
  }

通过对比,猜测在roadhog@2.4.1版本 env配置项下的production的extraBabelPlugins 无效,至少是对babel-plugin-import 插件无效,无法引入antd样式