Home > WeChat Applet > Mini Program Development > Compilation exception occurs after using Class

Compilation exception occurs after using Class

小云云
Release: 2018-02-23 10:04:45
Original
2157 people have browsed it

After the mini program uses the Class feature, the following exception may occur during compilation:
Uncaught SyntaxError: Unexpected token export
Uncaught SyntaxError: Unexpected token import
...... A script error occurs Or Page() is not called correctly

As shown:
Compilation exception occurs after using Class

Solution

Click "Project" on the left toolbar, Check "Enable ES6 to ES5"

As shown in the picture:

Compilation exception occurs after using Class


The above is the detailed content of Compilation exception occurs after using Class. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template