# v-service **Repository Path**: my_domain/v-service ## Basic Information - **Project Name**: v-service - **Description**: vue运行服务 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-07 - **Last Updated**: 2023-08-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Vue Start or build ### Environment - node v14+ - webpack v5.38+ - webpack-cli v4.9+ - webpack-dev-server v4.7+ ## 1、Git clones use projects ``` git clone https://gitee.com/my_domain/v-service-project.git cd v-service-project yarn yarn start ``` ## 2、Replace to use ### Install ``` npm install @wz-libs/v-service -D ``` ### or using yarn ``` yarn add @wz-libs/v-service -D ``` ### command command | explain | remark --- | --- | --- start | The development environment runs commands | yarn start / npm run start build | The production environment runs commands | yarn build / npm run build analyse --development | Development environment performance analysis | yarn analyse --development / npm run analyse --development analyse --production | Production environment performance analysis | yarn analyse --production / npm run analyse --production ### command extend ``` // Read environment variables from files .env.[NODE_ENV] // Example: npm run start -m dev npm run start -m [NODE_ENV] Or npm run start --mode [NODE_ENV] npm run build -m [NODE_ENV] Or npm run build --mode [NODE_ENV] ``` ### directory ``` ├── public // Static resource file │ ├── index.html // index.html ├── src // Important folder │ ├── main.js // Vue run and webpack compile entry file The must │ ├── app.vue │ ├── pages // Vue pages │ ├── assets // assets ├── .env/.env.[NODE_ENV] // Environment Variable Configuration ├── vw.config.js // custom webpack config ├── package.json // package.json ``` ### vw.config.js ``` const { merge } = require('webpack-merge') module.exports = { webpackConfig: (config, NODE_ENV) => { return merge(config, { // your webpack config }); } } ``` ### package.json ``` "scripts": { "start": "v-service start", // The development of start "build": "v-service build", // The deployment of building "analyse:dev": "v-service analyse --development", // Development environment performance analysis "analyse:prod": "v-service analyse --production" // Production environment performance analysis }, "dependencies": { "vue": "^2.6.13", "vue-router": "^3.5.1", }, "devDependencies": { "@wz-libs/v-service": "^1.0.8" } ```