open-index/open-npm huggingface dataset:
npm package: @icanvas/webpack
Description: 这是icanvas的默认webpack打包配置
Author: 潘丽敏
Latest version: 1.0.0-beta.2

# **iCanvas默认webpack打包配置**
---
## 打包参数

--env.target 打包目标 serve、web、wxgame
--env.mode 打包模式 development production
--env.zip 压缩代码
--env.qiniu 七牛资源版本号
--env.upload 上传远程资源

```bash
webpack-dev-server --open --env.target=serve
webpack --env.target=web --env.zip
webpack --env.target=wxgame --env.zip
webpack --env.target=web --env.mode=development
webpack --env.target=wxgame --env.mode=development
```
*注：target为serve时需要使用webpack-dev-server打包*

---
## 打包目标配置
*注：打包配置存放于“项目/webpack”文件夹下*

### build 公共打包参数

```json
{
    "core":"web",
    "ChineseName":"项目中文名",
    "EnglishName":"xiang4mu4zhong1wen2ming2",
    "Qiniu":{
        "Path":"wxgame",
        "Url":"http://qiniuyuming.com",
        "Key":"abcde",
        "Secret":"abcdefg",
        "Bucket":"cangku1",
    },
}
```
>打包所用核心类型：core<sup>web/wxgame</sup>
>项目中文名：ChineseName<sup>自动生成</sup>
>项目英文名：EnglishName<sup>自动生成</sup>
>七牛上传配置：Qiniu
>>七牛根路径：Path
>>七牛域名：Url
>>七牛Key：Key
>>七牛Secret：Secret
>>七牛仓库名：Bucket

### {target} 其它target打包参数
*例：wxgame.json*
```json
{
    "core": "wxgame",
    "game.json": {
        "deviceOrientation": "portrait",
        "openDataContext": "open",
        "navigateToMiniProgramAppIdList": []
    },
    "project.config.json": {
        "compileType": "game",
        "setting": {
            "es6": true,
            "postcss": true,
            "minified": true,
            "urlCheck": false,
            "uglifyFileName": true
        },
        "appid": "wxabcde"
    }
}
```
>打包目标：core
>微信游戏配置：game.json
>微信打包配置：project.config.json