Initialize my Vue

npm install normalize.css axios vant@next --save
npm install lib-flexible postcss-px2rem-exclude --save
npm install mitt --save
import "normalize.css/normalize.css";
import 'lib-flexible'

Set vue.config.js

vue.config.js

const path = require("path");
const resolve = dir => path.join(__dirname, dir);

module.exports = {
  publicPath:'./',
  chainWebpack: config => {
    config.resolve.alias
      .set("cpn", resolve("./src/components"))
      .set("ast", resolve("./src/assets"))
      .set("cmn", resolve("./src/common"))
      .set("nwk", resolve("./src/network"))
      .set("vws", resolve("./src/views"));
  }
};

package.json

  "postcss": {
    "plugins": {
      "autoprefixer": {},
      "postcss-px2rem-exclude":{
          "remUnit": 75,
          "exclude":"/node_modules|floder_name/i"
      }
    }
  }
npm i less less-loader@7.x --save-dev
分享