1. Install directly according to the vux document without manual configuration
npm install vue-cli -g // If not installedvue init airyland/vux2 my-project // Create a template named my-project cd my-project // Enter the projectnpm install --registry= // Start the installationnpm run dev // Run the project
2. Want to introduce vux components into the created Vue project
<1>. Install vux in the project
npm install vux --save
<2>. Install vux-loader (This vux document does not seem to be introduced, and there were a bunch of errors reported when the installation was not installed)
npm install vux-loader --save-dev
<3>. Install less-loader (This is used to correctly compile less source code, otherwise 'Cannot GET / ' will appear)
npm install less less-loader --save-dev
<4>. Install yaml-loader (read the language file correctly, I don’t seem to report any errors if I don’t install it)
npm install yaml-loader --save-dev
<5>. Configure in build/ file
const vuxLoader = require('vux-loader') const webpackConfig = originalConfig // Assign the original code to the variable webpackConfig, that is, change the original to const webpackConfig = (webpackConfig, { plugins: ['vux-ui'] })
Summarize
The above is a detailed explanation of the vux configuration code used in Vue introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time!