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

亚连
Release: 2018-06-02 11:09:31
Original
1490 people have browsed it

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

Changewebpack.base under thebuildfile. Comment out the following code in the conf.jsfile (eslint-loadercontent) and re-run.

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

Just need to add a line (blank line) after

jscssetc.

Or comment out the following code in the

webpack.base.conf.jsfile under thebuildfile (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 theindex.jsfile under theconfigfile

4. How to automatically open the browser

You can change the following code in the

index.jsfile under theconfigfileautoOpenBrowseristrue

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!

Related labels:
source:php.cn
Statement of this Website
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