1.1.3 • Published 9 months ago

@wz-libs/v-service v1.1.3

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

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

commandexplainremark
startThe development environment runs commandsyarn start / npm run start
buildThe production environment runs commandsyarn build / npm run build
analyse --developmentDevelopment environment performance analysisyarn analyse --development / npm run analyse --development
analyse --productionProduction environment performance analysisyarn 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"
 }