Vue.js project combat: Ant Design Pro open source projects to build large-scale practice notes (1)

Use Vue CLI 3 quickly create a project / custom configuration Webpack and Babel

1. Use the Vue CLI quickly create project

Select Custom configuration to create:

Here Insert Picture Description Here Insert Picture Description

2. pits 1

After you've created your project, open the project, the project started with VS Code:npm run serve

  • Introduction means inlet file:
    Here Insert Picture Description

  • Change in App.vue in:
    Here Insert Picture Description

  • Restart the project, given:

    Here Insert Picture Description

Solution :

  • In the project file folder New vue.config.js

  • Write the following contents:
    Here Insert Picture Description

3. Demand the introduction of components

  • Install plug-ins:npm i --save-dev babel-plugin-import
  • Babel.config.js related configuration file:
    Here Insert Picture Description
  • Change in main.js code components incorporated in:
    Here Insert Picture Description
Published 33 original articles · won praise 73 · views 2784

Guess you like

Origin blog.csdn.net/weixin_46124214/article/details/104135391