Neanderthals Programming Machines

    menreiki-plugin-webpack

    1.0.0-dev.1 • Public • Published

    menreiki的修改webpack及babel配置的插件

    安装

    npm install menreiki-plugin-webpack -D

    使用配置

    menreiki.config.js中,添加如下代码:

    exports.plugins = [
      ['menreiki-plugin-webpack', {
        webpack: function(webpackConfig) {
          // do something with webpackConfig
        },
        babel: function(babelConfig) {
          // do something with babelConfig
        }
      }]
    ];

    如何区分环境

    • 通过process.env.NODE_ENV来区分传入的配置是dev还是prod
    • 通过process.env.OC_ENV来区分,当前是处于menreiki dev,还是menreiki build,从而知道是本地开发还是服务上构建

    Install

    npm i menreiki-plugin-webpack

    DownloadsWeekly Downloads

    0

    Version

    1.0.0-dev.1

    License

    MIT

    Unpacked Size

    1.44 kB

    Total Files

    3

    Last publish

    Collaborators

    • bloody-ux