Home  >  Article  >  Web Front-end  >  How to quickly build a single-page application using vue-cli, as well as problems encountered and some solutions

How to quickly build a single-page application using vue-cli, as well as problems encountered and some solutions

亚连
亚连Original
2018-06-02 11:09:311566browse

This article mainly introduces the detailed explanation of the problems and solutions encountered in quickly building a single-page application with vue-cli. Now I will share it with you and give you a reference.

1. The error content is similar: Expected indentation of 0 spaces but found 4

Change webpack.base under the build file. Comment out the following code in the conf.js file (eslint-loader content) and re-run.

## 2. Error content: Newline required at end of file but not found

Just need to add a line (blank line) after

js css etc.

Or comment out the following code in the

webpack.base.conf.js file under the build file (eslint-loaderContent), re-run.

3. Modify the default port number

Do not want to use the default port number (

8080), you can change the following code in the index.js file under the config file

4. How to automatically open the browser

You can change the following code in the

index.js file under the config fileautoOpenBrowser istrue

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Instances of layui table checkbox selection select all styles and functions

layui select dynamically adds option Example

Detailed explanation of the whole process from buying a domain name to using pm2 to deploy a node.js project

The above is the detailed content of How to quickly build a single-page application using vue-cli, as well as problems encountered and some solutions. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn