@daoxin/webpack

0.0.4 • Public • Published

@daoxin/webpack

基于 Webpack 的基础配置扩展

如何使用

  1. 安装@daoxin/webpack
$ npm i @daoxin/webpack cross-env -D
  1. 配置 webpack.config.js
const { merge, webpackBaseConfig } = require("@daoxin/webpack");
module.exports = merge(webpackBaseConfig, {});
  1. package.json 配置
  // 项目名称
  "name": "@digital-screen-sm/app",
  "scripts": {
    "serve": "cross-env NODE_ENV=development  webpack serve --open",
    "build": "cross-env NODE_ENV=production  webpack build --progress"
    ...
  },
  // 基础配置
  "baseConfig": {
    "title": "这是项目标题",
    "oss": {
      "buildPath": "dist",
      "region": "oss-cn-chengdu",
      "bucket": "bucket-name",
      "accessKeyId": "xxxxx",
      "accessKeySecret": "xxxx"
    },
    "proxy": {
      "/api": "https://api.xxx.com/api/",
      "/dev": "http://192.168.0.1:8080/",
      "/wj": "http://192.168.0.2:8080/",
      "/jc": "http://192.168.0.3:8080/",
      "/xy": "http://192.168.0.4:8080/"
    }
  },
}

Readme

Keywords

none

Package Sidebar

Install

npm i @daoxin/webpack

Weekly Downloads

4

Version

0.0.4

License

none

Unpacked Size

44.6 kB

Total Files

5

Last publish

Collaborators

  • daoxin