bulb-webpack
### 使用说明
Last updated 6 months ago by mathewwang .
ISC · Original npm · Tarball · package.json
$ cnpm install bulb-webpack 
SYNC missed versions from official npm registry.

Bulb Webpack

使用说明

安装

npm install bulb-webpack

配置

// 在项目的根目录下,可以暴露下面的配置文件
vue.config.js

//例子
module.exports = {
  chainWebpack: (webpackConfig, environment, eggInfo) => {
  
  webpackConfig
    .externals({google:'google'})

   webpackConfig
      .plugin('DefinePlugin')
        .get('args')[0]
        .BULB_ENV = JSON.stringify(eggInfo.env) || '"local"'

    webpackConfig
      .plugin('DefinePlugin')
        .get('args')[0]
        .PROJECT_VER = JSON.stringify(`${ver}`)
  }
}

调用

const BulbWebpack = require('bulb-webpack');

// 初始化bulb webpack实例,
// 如果没有输入参数,将使用默认设置,./lib/utils/defaults.js
const bulbWebpack = new BulbWebpack({xxx});

//初始化命令: dev / start模式 并设置支持的target,这里也可以设置一个userInfo,在后面webpackChian回调中的environment参数可以获取到这里的userInfo
const cmd = new BulbWebpack.Command('dev', {
  targets:['client','server']
},{<userInfo>});

//启动打包
bulbWebpack.run(cmd);

Current Tags

  • 1.0.12                                ...           latest (6 months ago)

13 Versions

  • 1.0.12                                ...           6 months ago
  • 1.0.11                                ...           6 months ago
  • 1.0.10                                ...           6 months ago
  • 1.0.9                                ...           6 months ago
  • 1.0.8                                ...           6 months ago
  • 1.0.7                                ...           6 months ago
  • 1.0.6                                ...           6 months ago
  • 1.0.5                                ...           6 months ago
  • 1.0.4                                ...           7 months ago
  • 1.0.3                                ...           7 months ago
  • 1.0.2                                ...           7 months ago
  • 1.0.1                                ...           7 months ago
  • 1.0.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 13
Last Day 0
Last Week 13
Last Month 1
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |