Home  >  Article  >  WeChat Applet  >  Compilation exception occurs after using Class

Compilation exception occurs after using Class

小云云
小云云Original
2018-02-23 10:04:452118browse

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!

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